use of java.time.MonthDay in project jdk8u_jdk by JetBrains.
the class TCKMonthDay method test_withDayOfMonth_noChangeEqual.
@Test
public void test_withDayOfMonth_noChangeEqual() {
MonthDay test = MonthDay.of(6, 30);
assertEquals(test.withDayOfMonth(30), test);
}
use of java.time.MonthDay in project jdk8u_jdk by JetBrains.
the class TCKMonthDay method test_adjustDate_resolve.
@Test
public void test_adjustDate_resolve() {
MonthDay test = MonthDay.of(2, 29);
LocalDate date = LocalDate.of(2007, 6, 30);
assertEquals(test.adjustInto(date), LocalDate.of(2007, 2, 28));
}
use of java.time.MonthDay in project jdk8u_jdk by JetBrains.
the class TCKMonthDay method test_isValidYear_june.
//-----------------------------------------------------------------------
// isValidYear(int)
//-----------------------------------------------------------------------
@Test
public void test_isValidYear_june() {
MonthDay test = MonthDay.of(6, 30);
assertEquals(test.isValidYear(2007), true);
}
use of java.time.MonthDay in project jdk8u_jdk by JetBrains.
the class TCKMonthDay method test_atYear_int_leapYearAdjust.
@Test
public void test_atYear_int_leapYearAdjust() {
MonthDay test = MonthDay.of(2, 29);
assertEquals(test.atYear(2005), LocalDate.of(2005, 2, 28));
}
use of java.time.MonthDay in project jdk8u_jdk by JetBrains.
the class TCKMonthDay method test_isValidYear_febLeap.
@Test
public void test_isValidYear_febLeap() {
MonthDay test = MonthDay.of(2, 29);
assertEquals(test.isValidYear(2008), true);
}
Aggregations