コード例 #1
0
 @Test(
     expectedExceptions = AssertionError.class,
     expectedExceptionsMessageRegExp = ASSERTION_PATTERN)
 public void isDateAfterSameDayMonthYear() {
   assertThat(
       JUN_15_2012_11PM_AS_DATE, DateMatchers.after(new DayMonthYear(15, Months.JUNE, 2012)));
 }
コード例 #2
0
 @Test(
     expectedExceptions = AssertionError.class,
     expectedExceptionsMessageRegExp = ASSERTION_PATTERN)
 public void isDateAfterSameDeprecatedDateValues() {
   assertThat(JUN_15_2012_11PM_AS_DATE, DateMatchers.after(2012, Months.JUNE, 15));
 }
コード例 #3
0
 @Test
 public void isDateAfterEarlierDeprecatedDateValues() {
   assertThat(JUN_15_2012_11PM_AS_DATE, DateMatchers.after(2012, Months.JUNE, 14));
 }
コード例 #4
0
 @Test(
     expectedExceptions = AssertionError.class,
     expectedExceptionsMessageRegExp = ASSERTION_PATTERN)
 public void isDateAfterSameLocalDate() {
   assertThat(JUN_15_2012_11PM_AS_DATE, DateMatchers.after(JUN_15_2012));
 }
コード例 #5
0
 @Test
 public void isDateAfterEarlierLocalDate() {
   assertThat(JUN_15_2012_11PM_AS_DATE, DateMatchers.after(JUN_14_2012));
 }
コード例 #6
0
 @Test(
     expectedExceptions = AssertionError.class,
     expectedExceptionsMessageRegExp = ASSERTION_PATTERN)
 public void isDateAfterLaterSameDateDifferentTimeZone() {
   assertThat(JAN_01_2012_11AM_GMT_AS_DATE, DateMatchers.after(JAN_01_2012_11AM_PST_AS_DATE));
 }
コード例 #7
0
 @Test
 public void isDateAfterSameDateDifferentTimeZone() {
   assertThat(JAN_01_2012_11AM_PST_AS_DATE, DateMatchers.after(JAN_01_2012_11AM_GMT_AS_DATE));
 }
コード例 #8
0
 @Test(
     expectedExceptions = AssertionError.class,
     expectedExceptionsMessageRegExp = ASSERTION_PATTERN)
 public void isDateAfterSameDateTime() {
   assertThat(JUN_15_2012_11AM_AS_DATE, DateMatchers.after(2012, Months.JUNE, 15, 11, 00, 00));
 }
コード例 #9
0
 @Test
 public void isDateAfterEarlierDateTime() {
   assertThat(JUN_15_2012_11AM_AS_DATE, DateMatchers.after(2012, Months.JUNE, 15, 10, 59, 59));
 }
コード例 #10
0
 @Test
 public void isDateAfterEarlierDayMonthYear() {
   assertThat(
       JUN_15_2012_11PM_AS_DATE, DateMatchers.after(new DayMonthYear(14, Months.JUNE, 2012)));
 }