Package org.dbunit
Class MultiDataSourceAssertionError
java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.AssertionError
org.dbunit.MultiDataSourceAssertionError
- All Implemented Interfaces:
Serializable
Aggregates the
PrepAndExpectedTestCase.postTest(boolean) failures a
MultiDataSourcePrepAndExpectedTestCase collects across every involved data source,
instead of stopping at the first one.
Extends AssertionError - not a checked exception, and not
org.opentest4j.MultipleFailuresError - so a caller that already
assertThrows(AssertionError.class, ...) around a single data source's
DbComparisonFailure keeps working whether one data source fails or
several, and this class stays usable from a non-JUnit PrepAndExpectedTestCase delegate.
The first failure - in the wired data sources' declared order, not necessarily the reverse
order they were torn down in - becomes this instance's cause, so it
still surfaces one Caused by: hop below this instance, exactly as thrown by its
delegate. Every other failure is added as suppressed,
labelled with its data source name and lifecycle phase so it reads without unwrapping.
- Since:
- 3.6.0
- Author:
- Jeff Jensen
- See Also:
-
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString