|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dbunit.assertion.DefaultFailureHandler
public class DefaultFailureHandler
Default implementation of the FailureHandler
.
Nested Class Summary | |
---|---|
static class |
DefaultFailureHandler.DefaultFailureFactory
Default failure factory which returns DBUnits own assertion error instances. |
Constructor Summary | |
---|---|
DefaultFailureHandler()
Default constructor which does not provide any additional column information. |
|
DefaultFailureHandler(Column[] additionalColumnInfo)
Create a default failure handler |
|
DefaultFailureHandler(String[] additionalColumnInfo)
Create a default failure handler |
Method Summary | |
---|---|
protected String |
buildMessage(Difference diff)
|
Error |
createFailure(String message)
|
Error |
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. |
String |
getAdditionalInfo(ITable expectedTable,
ITable actualTable,
int row,
String columnName)
Returns a string to be appended to the assertion failure message. |
void |
handle(Difference diff)
Is invoked by the DbUnitAssert when a data cell difference
has been found. |
void |
setFailureFactory(FailureFactory failureFactory)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultFailureHandler()
public DefaultFailureHandler(Column[] additionalColumnInfo)
additionalColumnInfo
- the column names of the columns for which additional
information should be printed when an assertion failed.public DefaultFailureHandler(String[] additionalColumnInfo)
additionalColumnInfo
- the column names of the columns for which additional
information should be printed when an assertion failed.Method Detail |
---|
public void setFailureFactory(FailureFactory failureFactory)
failureFactory
- The DefaultFailureHandler.DefaultFailureFactory
to be used for creating assertion
errors.public Error createFailure(String message, String expected, String actual)
FailureFactory
createFailure
in interface FailureFactory
message
- The reason for the failureexpected
- The expected resultactual
- The actual result
public Error createFailure(String message)
createFailure
in interface FailureFactory
message
- The reason for the failure
public String getAdditionalInfo(ITable expectedTable, ITable actualTable, int row, String columnName)
FailureHandler
getAdditionalInfo
in interface FailureHandler
row
- The row for which the assertion failedcolumnName
- The column for which the assertion failed
public void handle(Difference diff)
DifferenceListener
DbUnitAssert
when a data cell difference
has been found.
handle
in interface DifferenceListener
diff
- The difference that has been foundprotected String buildMessage(Difference diff)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |