T - The type of the value used to determine which
ValueComparer to use.public class ConditionalSetBiValueComparer<T> extends ValueComparerBase
ValueComparers based on a value present or not in a
set of values.
When the value returned by the
actualValueFactory is in
values, use the
inValuesValueComparer on the row;
otherwise, use the
notInValuesValueComparer on the row.BASE_FAIL_MSG| Constructor and Description |
|---|
ConditionalSetBiValueComparer(ValueFactory<T> actualValueFactory,
Set<T> values,
ValueComparer inValuesValueComparer,
ValueComparer notInValuesValueComparer) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected boolean |
isActualValueInValues(ITable actualTable,
int rowNum) |
String |
toString() |
comparepublic ConditionalSetBiValueComparer(ValueFactory<T> actualValueFactory, Set<T> values, ValueComparer inValuesValueComparer, ValueComparer notInValuesValueComparer)
actualValueFactory - Factory to make the value to lookup in the values list.values - List of values that mean to use the inValuesValueComparer.inValuesValueComparer - The ValueComparer used when the value from the
actualValueFactory is in the values map.notInValuesValueComparer - The ValueComparer used when the value from the
actualValueFactory is not in the values map.public String doCompare(ITable expectedTable, ITable actualTable, int rowNum, String columnName, DataType dataType, Object expectedValue, Object actualValue) throws DatabaseUnitException
ValueComparerBasedoCompare in class ValueComparerBaseDatabaseUnitExceptionValueComparer.compare(ITable, ITable, int, String, DataType, Object,
Object)protected boolean isActualValueInValues(ITable actualTable, int rowNum) throws DataSetException
DataSetExceptionpublic String toString()
toString in class ValueComparerBaseCopyright © 2002–2025. All rights reserved.