use of java.time.MonthDay in project jdk8u_jdk by JetBrains.
the class TCKMonthDay method test_hashCode.
//-----------------------------------------------------------------------
// hashCode()
//-----------------------------------------------------------------------
@Test(dataProvider = "sampleDates")
public void test_hashCode(int m, int d) {
MonthDay a = MonthDay.of(m, d);
assertEquals(a.hashCode(), a.hashCode());
MonthDay b = MonthDay.of(m, d);
assertEquals(a.hashCode(), b.hashCode());
}
use of java.time.MonthDay in project jdk8u_jdk by JetBrains.
the class TCKMonthDay method test_adjustDate_equal.
@Test
public void test_adjustDate_equal() {
MonthDay test = MonthDay.of(6, 30);
LocalDate date = LocalDate.of(2007, 6, 30);
assertEquals(test.adjustInto(date), date);
}
use of java.time.MonthDay in project jdk8u_jdk by JetBrains.
the class TCKMonthDay method test_isValidYear_febNonLeap.
@Test
public void test_isValidYear_febNonLeap() {
MonthDay test = MonthDay.of(2, 29);
assertEquals(test.isValidYear(2007), false);
}
use of java.time.MonthDay in project jdk8u_jdk by JetBrains.
the class TestMonthDay method test_with_Month_noChangeSame.
@Test
public void test_with_Month_noChangeSame() {
MonthDay test = MonthDay.of(6, 30);
assertSame(test.with(Month.JUNE), test);
}
use of java.time.MonthDay in project jdk8u_jdk by JetBrains.
the class TestMonthDay method test_adjustDate_same.
@Test
public void test_adjustDate_same() {
MonthDay test = MonthDay.of(6, 30);
LocalDate date = LocalDate.of(2007, 6, 30);
assertSame(test.adjustInto(date), date);
}
Aggregations