My favorites | Sign in
Project Logo
                
Search
for
Updated Jan 14, 2008 by mattijshoitink
Labels: Resource, Developer
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 dbunit

The configuration of dbunit is located in src/test/resources/dbunit-test-configuration.xml. The following properties are used:

Adapting the dataset inserted before each test

The 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
Hosted by Google Code