Пример #1
0
 @Test
 public void testMinusMonthsOverflow() throws Exception {
   try {
     testDate.minusMonths(Integer.MAX_VALUE);
     fail();
   } catch (IllegalCalendarFieldValueException ex) {
     assertEquals(ex.getRule(), MinguoChronology.yearOfEraRule());
   }
 }
Пример #2
0
 // -----------------------------------------------------------------------
 // minusMonths()
 // -----------------------------------------------------------------------
 @Test
 public void testMinusMonths() {
   assertEquals(
       testDate.minusMonths(1),
       MinguoDate.of(testYear, testMonthOfYear.previous(), testDayOfMonth));
 }