public abstract class ValueComparerBase extends java.lang.Object implements ValueComparer
ValueComparers providing a template method and common
elements, mainly consistent log message and toString.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BASE_FAIL_MSG
Format String for consistent fail message; substitution strings are:
actual, fail phrase, expected.
|
| Constructor and Description |
|---|
ValueComparerBase() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
compare(ITable expectedTable,
ITable actualTable,
int rowNum,
java.lang.String columnName,
DataType dataType,
java.lang.Object expectedValue,
java.lang.Object actualValue)
Compare expected and actual values.
|
protected abstract java.lang.String |
doCompare(ITable expectedTable,
ITable actualTable,
int rowNum,
java.lang.String columnName,
DataType dataType,
java.lang.Object expectedValue,
java.lang.Object actualValue)
Do the comparison and return a fail message or null if comparison passes.
|
java.lang.String |
toString() |
public static final java.lang.String BASE_FAIL_MSG
public java.lang.String compare(ITable expectedTable, ITable actualTable, int rowNum, java.lang.String columnName, DataType dataType, java.lang.Object expectedValue, java.lang.Object actualValue) throws DatabaseUnitException
doCompare(ITable, ITable, int, String, DataType, Object, Object).compare in interface ValueComparerexpectedTable - 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 - The DataType for the current column comparing. Use
DataType.compare(Object, Object) for equal, not equal,
less than, and greater than comparisons.expectedValue - The current expected value for the column.actualValue - The current actual value for the column.DatabaseUnitExceptionprotected abstract java.lang.String doCompare(ITable expectedTable, ITable actualTable, int rowNum, java.lang.String columnName, DataType dataType, java.lang.Object expectedValue, java.lang.Object actualValue) throws DatabaseUnitException
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2002-2018. All Rights Reserved.