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