예제 #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()));
 }
예제 #2
0
 @Test
 public void testGetDayOfYear() {
   assertEquals(testDate.getDayOfYear(), testDayOfYear);
 }