@Test( groups = {"tck"}, expectedExceptions = DateTimeException.class) public void test_adjust_toMonth() { JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1726, 1, 4); jdate.with(Month.APRIL); }
// ----------------------------------------------------------------------- // JapaneseDate.with(Local*) // ----------------------------------------------------------------------- @Test(groups = {"tck"}) public void test_adjust_toLocalDate() { JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1726, 1, 4); JapaneseDate test = jdate.with(LocalDate.of(2012, 7, 6)); assertEquals(test, JapaneseChronology.INSTANCE.date(2012, 7, 6)); }
@Test(groups = {"tck"}) public void test_adjust2() { JapaneseDate base = JapaneseChronology.INSTANCE.date(1728, 12, 2); JapaneseDate test = base.with(Adjusters.lastDayOfMonth()); assertEquals(test, JapaneseChronology.INSTANCE.date(1728, 12, 31)); }