@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(expectedExceptions = NullPointerException.class) public void testGetNull() throws Exception { testDate.get(null); }
public void testGetUnsupported() throws Exception { assertEquals(testDate.get(LocalTime.rule()), null); }