|
HibernateDaoTestSetup
For the daos that make use of hibernate DBunit is used to insert test data before each test. In order to use dbunit for the test (and set up hibernate aswell) sublcass org.webical.dao.impl.DataBaseTest (located in src/test/java). Configuring dbunitThe configuration of dbunit is located in src/test/resources/dbunit-test-configuration.xml. The following properties are used:
Adapting the dataset inserted before each testThe dataset inserted by dbunit is located in src/test/resources/dbunit-test-dataset.xml. You can add additional elements to this file in order to insert them before each test. To try out the test data run org.webical.dao.impl.DataBaseTest in eclipse. Resources
|
Sign in to add a comment