@Test public void testGet() throws Exception { assertEquals( testDate.get(MinguoChronology.eraRule()), MinguoChronology.eraRule().field(testDate.getEra().getValue())); assertEquals( testDate.get(MinguoChronology.yearOfEraRule()), MinguoChronology.yearOfEraRule().field(testDate.getYearOfEra())); assertEquals( testDate.get(MinguoChronology.monthOfYearRule()), MinguoChronology.monthOfYearRule().field(testDate.getMonthOfYear().getValue())); assertEquals( testDate.get(MinguoChronology.dayOfMonthRule()), MinguoChronology.dayOfMonthRule().field(testDate.getDayOfMonth())); assertEquals( testDate.get(MinguoChronology.dayOfYearRule()), MinguoChronology.dayOfYearRule().field(testDate.getDayOfYear())); assertEquals( testDate.get(MinguoChronology.dayOfWeekRule()), MinguoChronology.dayOfWeekRule().field(testDate.getDayOfWeek().getValue())); }
@Test public void testGetDayOfWeekCrossCheck() throws Exception { MinguoDate date = MinguoDate.of(testYear, testMonthOfYear, testDayOfMonth); assertEquals(date.getDayOfWeek(), date.toLocalDate().getDayOfWeek()); }