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