philwebb/spring-test-dbunit — Issue #5: DbUnitTestExecutionListener swallows test exceptions and performs dbunit test anyway
Author: mzagar
Created: 2012-01-13 07:02:30+00:00
State: open

See sample code bellow: if repo.store() call throws exception, DbUnitTestExecutionListener will ignore it and will perform @ExpectedDatabase test. It would be better to re-throw test exception if it happens and never do any dbunit tests.

@Test
@ExpectedDatabase(value="inbound_test_store.xml")
public void test_store_must_succeed() {
repo.store(new Model(0L, "x1, "x2, null));
}