Class IsActualEqualToExpectedWithEmptyFailMessageValueComparer
java.lang.Object
org.dbunit.assertion.comparer.value.ValueComparerBase
org.dbunit.assertion.comparer.value.ValueComparerTemplateBase
org.dbunit.assertion.comparer.value.IsActualEqualToExpectedWithEmptyFailMessageValueComparer
- All Implemented Interfaces:
ValueComparer
public class IsActualEqualToExpectedWithEmptyFailMessageValueComparer
extends ValueComparerTemplateBase
ValueComparer implementation that verifies actual value is equal to
expected value and sets fail message to empty String.
This is primarily for the original assertEquals(*) on
DbUnitAssert so the
Difference message stays the same.- Since:
- 2.6.0
- Author:
- Jeff Jensen
-
Field Summary
Fields inherited from class org.dbunit.assertion.comparer.value.ValueComparerBase
BASE_FAIL_MSG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturns the text snippet for substitution inValueComparerBase.BASE_FAIL_MSG.protected booleanisExpected(ITable expectedTable, ITable actualTable, int rowNum, String columnName, DataType dataType, Object expectedValue, Object actualValue) Determines whether the actual value compares as expected against the expected value.protected StringmakeFailMessage(Object expectedValue, Object actualValue) Makes the fail message usingValueComparerTemplateBase.getFailPhrase().Methods inherited from class org.dbunit.assertion.comparer.value.ValueComparerTemplateBase
doCompareMethods inherited from class org.dbunit.assertion.comparer.value.ValueComparerBase
compare, toString
-
Constructor Details
-
IsActualEqualToExpectedWithEmptyFailMessageValueComparer
public IsActualEqualToExpectedWithEmptyFailMessageValueComparer()
-
-
Method Details
-
isExpected
protected boolean isExpected(ITable expectedTable, ITable actualTable, int rowNum, String columnName, DataType dataType, Object expectedValue, Object actualValue) throws DatabaseUnitException Description copied from class:ValueComparerTemplateBaseDetermines whether the actual value compares as expected against the expected value.- Specified by:
isExpectedin classValueComparerTemplateBase- Parameters:
expectedTable- Table containing all expected results.actualTable- Table containing all actual results.rowNum- The current row number comparing.columnName- The name of the current column comparing.dataType- TheDataTypefor the current column comparing.expectedValue- The current expected value for the column.actualValue- The current actual value for the column.- Returns:
- true if comparing actual to expected is as expected.
- Throws:
DatabaseUnitException- if the comparison cannot be performed.
-
makeFailMessage
Description copied from class:ValueComparerTemplateBaseMakes the fail message usingValueComparerTemplateBase.getFailPhrase().- Overrides:
makeFailMessagein classValueComparerTemplateBase- Parameters:
expectedValue- the current expected value for the column.actualValue- the current actual value for the column.- Returns:
- the formatted fail message with the fail phrase.
-
getFailPhrase
Description copied from class:ValueComparerTemplateBaseReturns the text snippet for substitution inValueComparerBase.BASE_FAIL_MSG.- Specified by:
getFailPhrasein classValueComparerTemplateBase- Returns:
- The text snippet for substitution in
ValueComparerBase.BASE_FAIL_MSG.
-