Esempio n. 1
0
 @Test
 public void testPlusWeeksOverflow() throws Exception {
   try {
     testDate.plusWeeks(Integer.MAX_VALUE);
     fail();
   } catch (IllegalCalendarFieldValueException ex) {
     assertEquals(ex.getRule(), MinguoChronology.yearOfEraRule());
   }
 }
Esempio n. 2
0
 // -----------------------------------------------------------------------
 // plusWeeks()
 // -----------------------------------------------------------------------
 @Test
 public void testPlusWeeks() {
   assertEquals(
       testDate.plusWeeks(2), MinguoDate.of(testYear, testMonthOfYear, testDayOfMonth + (2 * 7)));
 }