use of java.time.MonthDay in project j2objc by google.
the class TCKMonthDay method now.
// -----------------------------------------------------------------------
// now()
// -----------------------------------------------------------------------
@Test
public void now() {
MonthDay expected = MonthDay.now(Clock.systemDefaultZone());
MonthDay test = MonthDay.now();
for (int i = 0; i < 100; i++) {
if (expected.equals(test)) {
return;
}
expected = MonthDay.now(Clock.systemDefaultZone());
test = MonthDay.now();
}
assertEquals(test, expected);
}
use of java.time.MonthDay in project j2objc by google.
the class TCKMonthDay method test_atYear_int.
// -----------------------------------------------------------------------
// atYear(int)
// -----------------------------------------------------------------------
@Test
public void test_atYear_int() {
MonthDay test = MonthDay.of(6, 30);
assertEquals(test.atYear(2008), LocalDate.of(2008, 6, 30));
}
use of java.time.MonthDay in project j2objc by google.
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 j2objc by google.
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 j2objc by google.
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));
}
Aggregations