use of java.time.MonthDay in project JDK8 by ABHSY.
the class DataExcample2 method testData.
@Test
public void testData() {
LocalDate of = LocalDate.of(2014, 4, 1);
// System.out.print(of.equals(today));
LocalDate localDate = today.plusDays(1);
// boolean after = localDate.isAfter(of);
System.out.print(localDate.isBefore(of));
LocalDate datebirth = LocalDate.of(1994, 4, 1);
MonthDay of1 = MonthDay.of(datebirth.getMonth(), datebirth.getDayOfMonth());
MonthDay currentMonthDay = MonthDay.from(today);
}
use of java.time.MonthDay in project j2objc by google.
the class TCKMonthDay method test_with_Month_noChangeEqual.
@Test
public void test_with_Month_noChangeEqual() {
MonthDay test = MonthDay.of(6, 30);
assertEquals(test.with(Month.JUNE), test);
}
use of java.time.MonthDay in project j2objc by google.
the class TCKMonthDay method now_Clock.
// -----------------------------------------------------------------------
// now(Clock)
// -----------------------------------------------------------------------
@Test
public void now_Clock() {
Instant instant = LocalDateTime.of(2010, 12, 31, 0, 0).toInstant(ZoneOffset.UTC);
Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
MonthDay test = MonthDay.now(clock);
assertEquals(test.getMonth(), Month.DECEMBER);
assertEquals(test.getDayOfMonth(), 31);
}
use of java.time.MonthDay in project j2objc by google.
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 j2objc by google.
the class TCKMonthDay method factory_parse_success.
@Test()
@UseDataProvider("provider_goodParseData")
public void factory_parse_success(String text, MonthDay expected) {
MonthDay monthDay = MonthDay.parse(text);
assertEquals(monthDay, expected);
}
Aggregations