@Test public void testWithYearInvalidTooBig() throws Exception { try { testDate.withYear(testEra, 10000); fail(); } catch (IllegalCalendarFieldValueException ex) { assertEquals(ex.getRule(), MinguoChronology.yearOfEraRule()); } }
// ----------------------------------------------------------------------- // withYearOfEra() // ----------------------------------------------------------------------- @Test public void testWithYear() { MinguoDate date = testDate.withYear(MinguoEra.BEFORE_MINGUO, 100); assertEquals( date, MinguoDate.of(MinguoEra.BEFORE_MINGUO, 100, testMonthOfYear, testDayOfMonth)); }