Ejemplo n.º 1
0
 private void assertMinguoDate(
     MinguoDate test, MinguoEra era, int year, MonthOfYear month, int day) throws Exception {
   assertEquals(test.getEra(), era);
   assertEquals(test.getYearOfEra(), year);
   assertEquals(test.getMonthOfYear(), month);
   assertEquals(test.getDayOfMonth(), day);
   assertEquals(test.isLeapYear(), isLeapYear(era.getValue(), year));
 }
Ejemplo n.º 2
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()));
 }
Ejemplo n.º 3
0
 @Test
 public void testGetEra() {
   assertEquals(testDate.getEra(), testEra);
 }