|
||||||||||
| 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(java.lang.String[] additionalColumnInfo)
Create a default failure handler |
|
| Method Summary | |
|---|---|
protected java.lang.String |
buildMessage(Difference diff)
|
java.lang.Error |
createFailure(java.lang.String message)
|
java.lang.Error |
createFailure(java.lang.String message,
java.lang.String expected,
java.lang.String actual)
Creates a new failure object which can have different types, depending on the testing framework you are currently using (e.g. |
java.lang.String |
getAdditionalInfo(ITable expectedTable,
ITable actualTable,
int row,
java.lang.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)
|
java.lang.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(java.lang.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 java.lang.Error createFailure(java.lang.String message,
java.lang.String expected,
java.lang.String actual)
FailureFactory
createFailure in interface FailureFactorymessage - The reason for the failureexpected - The expected resultactual - The actual result
public java.lang.Error createFailure(java.lang.String message)
createFailure in interface FailureFactorymessage - The reason for the failure
public java.lang.String getAdditionalInfo(ITable expectedTable,
ITable actualTable,
int row,
java.lang.String columnName)
FailureHandler
getAdditionalInfo in interface FailureHandlerrow - The row for which the assertion failedcolumnName - The column for which the assertion failed
public void handle(Difference diff)
DifferenceListenerDbUnitAssert when a data cell difference
has been found.
handle in interface DifferenceListenerdiff - The difference that has been foundprotected java.lang.String buildMessage(Difference diff)
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||