예제 #1
0
 @Test
 public void testPlusMonthsOverflow() throws Exception {
   try {
     testDate.plusMonths(Integer.MAX_VALUE);
     fail();
   } catch (IllegalCalendarFieldValueException ex) {
     assertEquals(ex.getRule(), MinguoChronology.yearOfEraRule());
   }
 }
예제 #2
0
 // -----------------------------------------------------------------------
 // plusMonths()
 // -----------------------------------------------------------------------
 @Test
 public void testPlusMonths() {
   assertEquals(
       testDate.plusMonths(5), MinguoDate.of(testYear, testMonthOfYear.roll(5), testDayOfMonth));
 }