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