1 package org.dbunit.assertion.comparer.value; 2 3 import org.dbunit.DatabaseUnitException; 4 import org.dbunit.dataset.ITable; 5 import org.dbunit.dataset.datatype.DataType; 6 7 /** 8 * Strategy for comparing values. 9 * 10 * @author Jeff Jensen 11 * @since 2.6.0 12 */ 13 @FunctionalInterface 14 public interface ValueComparer 15 { 16 /** 17 * Compare expected and actual values. 18 * 19 * @param expectedTable 20 * Table containing all expected results. 21 * @param actualTable 22 * Table containing all actual results. 23 * @param rowNum 24 * The current row number comparing. 25 * @param columnName 26 * The name of the current column comparing. 27 * @param dataType 28 * The {@link DataType} for the current column comparing. Use 29 * {@link DataType#compare(Object, Object)} for equal, not equal, 30 * less than, and greater than comparisons. 31 * @param expectedValue 32 * The current expected value for the column. 33 * @param actualValue 34 * The current actual value for the column. 35 * @return compare failure message or null if successful compare. 36 * @throws DatabaseUnitException 37 */ 38 String compare(ITable expectedTable, ITable actualTable, int rowNum, 39 String columnName, DataType dataType, Object expectedValue, 40 Object actualValue) throws DatabaseUnitException; 41 }