View Javadoc
1   package org.dbunit.assertion.comparer.value;
2   
3   import org.dbunit.dataset.datatype.DataType;
4   import org.dbunit.dataset.datatype.TypeCastException;
5   
6   /**
7    * {@link ValueComparer} implementation that verifies actual Timestamp value is
8    * greater than or equal to expected value, ignoring the milliseconds.
9    *
10   * @author Jeff Jensen
11   * @since 3.1.0
12   */
13  public class IsActualGreaterThanOrEqualToExpectedWithIgnoreMillisValueComparer
14          extends TimestampIgnoreMillisValueComparerBase
15  {
16      @Override
17      protected boolean compareTimestamps(final DataType dataType,
18              final long actualTime, final long expectedTime)
19              throws TypeCastException
20      {
21          return dataType.compare(actualTime, expectedTime) > -1;
22      }
23  
24      @Override
25      protected String getFailPhrase()
26      {
27          return "not greater than or equal to";
28      }
29  }