Package org.dbunit.assertion
Class JUnitFailureFactory
java.lang.Object
org.dbunit.assertion.JUnitFailureFactory
- All Implemented Interfaces:
FailureFactory
Adapter that lets dbunit create JUnit failure objects.
Returns dbUnit's own DbComparisonFailure/DbAssertionFailedError
rather than a JUnit-framework-specific failure type. dbUnit's own types are used
even when JUnit is confirmed present (see DbUnitAssertBase)
so that the object returned here never requires a runtime dependency on any
particular test framework's failure classes.
- Since:
- 2.4.0
- Version:
- $Revision$ $Date$
- Author:
- gommma (gommma AT users.sourceforge.net), Last changed by: $Author$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFailure(String message) Creates a new assertion failure object with only a message and no expected/actual values.createFailure(String message, String expected, String actual) Creates a new failure object which can have different types, depending on the testing framework you are currently using (e.g.
-
Constructor Details
-
JUnitFailureFactory
public JUnitFailureFactory()
-
-
Method Details
-
createFailure
Description copied from interface:FailureFactoryCreates a new failure object which can have different types, depending on the testing framework you are currently using (e.g. JUnit, TestNG, ...)- Specified by:
createFailurein interfaceFailureFactory- Parameters:
message- The reason for the failureexpected- The expected resultactual- The actual result- Returns:
- The comparison failure object for this handler (can be JUnit or some other) which can be thrown on an assertion failure
-
createFailure
Description copied from interface:FailureFactoryCreates a new assertion failure object with only a message and no expected/actual values.- Specified by:
createFailurein interfaceFailureFactory- Parameters:
message- The reason for the failure- Returns:
- The assertion failure object for this handler (can be JUnit or some other) which can be thrown on an assertion failure
-