示例#1
0
 public void test_nowIsNotNever() throws Exception {
   Long nowDate = System.currentTimeMillis();
   Assert.assertTrue(
       DateTimeOperations.compare(
           nowDate,
           CompareType.NE,
           DateTimeOperations.never(),
           DateTimeFieldType.millisOfSecond()));
 }
示例#2
0
 public void test_nullIsNever() throws Exception {
   Long nullDate = null;
   Assert.assertTrue(
       DateTimeOperations.compare(
           nullDate,
           CompareType.EQ,
           DateTimeOperations.never(),
           DateTimeFieldType.millisOfSecond()));
 }
示例#3
0
 public void test_zeroDateIsNotNever() throws Exception {
   Long at1January1970 = DateTimeOperations.convert(Period.seconds(0));
   Assert.assertFalse(
       DateTimeOperations.compare(
               at1January1970, CompareType.EQ, null, DateTimeFieldType.millisOfSecond())
           || DateTimeOperations.compare(
               at1January1970,
               CompareType.EQ,
               DateTimeOperations.never(),
               DateTimeFieldType.millisOfSecond()));
 }