Class ConditionalSelectorMultiValueComparer
java.lang.Object
org.dbunit.assertion.comparer.value.ValueComparerBase
org.dbunit.assertion.comparer.value.ConditionalSelectorMultiValueComparer
- All Implemented Interfaces:
ValueComparer
- Since:
- 2.6.0
- Author:
- Jeff Jensen
-
Field Summary
Fields inherited from class org.dbunit.assertion.comparer.value.ValueComparerBase
BASE_FAIL_MSG -
Constructor Summary
ConstructorsConstructorDescriptionConditionalSelectorMultiValueComparer(Map<Object, ValueComparer> valueComparers, ValueComparerSelector valueComparerSelector) Creates a comparer that selects aValueComparerfrom the given map using the given selector. -
Method Summary
Methods inherited from class org.dbunit.assertion.comparer.value.ValueComparerBase
compare
-
Constructor Details
-
ConditionalSelectorMultiValueComparer
public ConditionalSelectorMultiValueComparer(Map<Object, ValueComparer> valueComparers, ValueComparerSelector valueComparerSelector) Creates a comparer that selects aValueComparerfrom the given map using the given selector.- Parameters:
valueComparers- the map of value comparers to select from.valueComparerSelector- the selector used to choose a value comparer from the map.
-
-
Method Details
-
doCompare
public String doCompare(ITable expectedTable, ITable actualTable, int rowNum, String columnName, DataType dataType, Object expectedValue, Object actualValue) throws DatabaseUnitException Description copied from class:ValueComparerBaseDo the comparison and return a fail message or null if comparison passes.- Specified by:
doComparein classValueComparerBase- 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:
- compare failure message or null if successful compare.
- Throws:
DatabaseUnitException- if the comparison cannot be performed.- See Also:
-
toString
- Overrides:
toStringin classValueComparerBase
-