View Javadoc
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    * {@link ValueComparer} implementation that verifies actual value is greater
9    * than expected value.
10   *
11   * @author jjensen
12   * @since 2.6.0
13   */
14  public class IsActualGreaterThanExpectedValueComparer extends ValueComparerTemplateBase
15  {
16      @Override
17      protected boolean isExpected(final ITable expectedTable,
18              final ITable actualTable, final int rowNum, final String columnName,
19              final DataType dataType, final Object expectedValue,
20              final Object actualValue) throws DatabaseUnitException
21      {
22          return dataType.compare(actualValue, expectedValue) > 0;
23      }
24  
25      @Override
26      protected String getFailPhrase()
27      {
28          return "not greater than";
29      }
30  }