Open rbsrcy opened 8 years ago
@philwebb Hi:
Why do not put the Dataset that declare by @ExpectedDatabase in @ExpectedDatabases togeter,and just verfify onece with after @Test function;
Here is the master code in in com.github.springtestdbunit.DbUnitRunner
private void verifyExpected(DbUnitTestContext testContext, Annotations<ExpectedDatabase> annotations) throws Exception { if (testContext.getTestException() != null) { if (logger.isDebugEnabled()) { logger.debug("Skipping @DatabaseTest expectation due to test exception " + testContext.getTestException().getClass()); } return; } DatabaseConnections connections = testContext.getConnections(); DataSetModifier modifier = getModifier(testContext, annotations); boolean override = false; for (ExpectedDatabase annotation : annotations.getMethodAnnotations()) { verifyExpected(testContext, connections, modifier, annotation); override |= annotation.override(); } if (!override) { for (ExpectedDatabase annotation : annotations.getClassAnnotations()) { verifyExpected(testContext, connections, modifier, annotation); } } }
@philwebb Hi:
Why do not put the Dataset that declare by @ExpectedDatabase in @ExpectedDatabases togeter,and just verfify onece with after @Test function;
Here is the master code in in com.github.springtestdbunit.DbUnitRunner