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 or equal to expected value.
10   *
11   * @author Jeff Jensen
12   * @since 2.6.0
13   */
14  public class IsActualGreaterThanOrEqualToExpectedValueComparer
15          extends ValueComparerTemplateBase
16  {
17      @Override
18      protected boolean isExpected(final ITable expectedTable,
19              final ITable actualTable, final int rowNum, final String columnName,
20              final DataType dataType, final Object expectedValue,
21              final Object actualValue) throws DatabaseUnitException
22      {
23          return dataType.compare(actualValue, expectedValue) > -1;
24      }
25  
26      @Override
27      protected String getFailPhrase()
28      {
29          return "not greater than or equal to";
30      }
31  }