Browsing projects by Tag(s)

Select a tag to browse associated projects and drill deeper into the tag cloud.

Showing page 1 of 1

Latest Version: 0.9.2-m2 A collection of very simple utilities with the goal of making writing tests easier with less code. FunctionalTestRunner - JUnit ExtensionAdded in 0.9.2-m1, read about it on the Carbon Five blog: ... [More] http://blog.carbonfive.com/2009/10/testing/c5-test-support-new-addition-functionaltestrunner Spring 2.5+ Test ExtensionsDataSetTestExecutionListenerLoads DBUnit test fixtures before test methods flagged with the @DataSet annotation. Participates in an active transactions if available or in auto-commit mode if one is not. @ContextConfiguration(locations = {"classpath:applicationContext.xml"}) public class TripRepositoryImplTest extends AbstractTransactionalDataSetTestCase { @Autowired TripRepository repository; @Test @DataSet public void forIdShouldFindTrip() throws Exception { Trip trip = repository.forId(2); assertThat(trip, not(nullValue())); } }The high-level execution path for this example looks like: Inject dependencies (DependencyInjectionTestExecutionListener) Start transaction (TransactionalTestExecutionListener) Load dbunit data set from TripRepositoryImplTest.xml (DataSetTestExecutionListener) using the setup operation (default is CLEAN_INSERT) Execute test Optionally cleanup dbunit data using the tear down operation (default is NONE) Rollback transaction (TransactionalTestExecutionListener) Here’s the trimmed down log output for this test: INFO: Began transaction (1): transaction manager; rollback [true] (TransactionalTestExecutionListener.java:259) INFO: Loading dataset from location 'classpath:/eg/domain/TripRepositoryImplTest.xml' using operation 'CLEAN_INSERT'. (DataSetTestExecutionListener.java:152) INFO: Tearing down dataset using operation 'NONE', leaving database connection open. (DataSetTestExecutionListener.java:67) INFO: Rolled back transaction after test execution for test context (TransactionalTestExecutionListener.java:279)See http://blog.carbonfive.com/2008/07/testing/database-testing-with-spring-25-and-dbunit for additional details. HibernateOpenSessionTestExecutionListenerOpens a Hibernate Session for the duration of a test method so that you can fetch lazy associations and collections. Useful for integration testing. Data FixturesDBUnitFixture - Load a DBUnit dataset easily. SQLFixture - Load a SQL script easily. EasyMock ExtensionsArgumentAssertion - Make assertions on parameters passed to a mock. [Less]

0
 
  0 reviews  |  0 users  |  1,655 lines of code  |  0 current contributors  |  Analyzed 3 days ago
 
 
 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.