public abstract class ValueComparerBase extends Object implements ValueComparer
ValueComparers providing a template method and common
elements, mainly consistent log message and toString.| Modifier and Type | Field and Description |
|---|---|
static 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 |
|---|---|
String |
compare(ITable expectedTable,
ITable actualTable,
int rowNum,
String columnName,
DataType dataType,
Object expectedValue,
Object actualValue)
Compare expected and actual values.
|
protected abstract String |
doCompare(ITable expectedTable,
ITable actualTable,
int rowNum,
String columnName,
DataType dataType,
Object expectedValue,
Object actualValue)
Do the comparison and return a fail message or null if comparison passes.
|
String |
toString() |
public static final String BASE_FAIL_MSG
public String compare(ITable expectedTable, ITable actualTable, int rowNum, String columnName, DataType dataType, Object expectedValue, 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 String doCompare(ITable expectedTable, ITable actualTable, int rowNum, String columnName, DataType dataType, Object expectedValue, Object actualValue) throws DatabaseUnitException
Copyright © 2002–2025. All rights reserved.