I annotate my test methods like this:
@Test
@DatabaseSetup("/default_database_data.xml")
@ExpectedDatabase(value = "/expected_database_1.xml", assertionMode = NON_STRICT)
is it possible to manually perform the things that @DatabaseSetup
and @ExpectedDatabase
does:
@Test
public void test(){
// DBUnit.setup("/default_database_data.xml");
dao.insert(...);
// DBUnit.expected("/expected_database_1.xml");
}
I made the syntax up, just to give you an idea of what I need: perform 2 setups and assertions in one unit test.