use of java.time.LocalDateTime in project jdk8u_jdk by JetBrains.
the class TCKLocalDateTime method factory_of_5intsMonth.
//-----------------------------------------------------------------------
@Test
public void factory_of_5intsMonth() {
LocalDateTime dateTime = LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 40);
check(dateTime, 2007, 7, 15, 12, 30, 40, 0);
}
use of java.time.LocalDateTime in project jdk8u_jdk by JetBrains.
the class TCKLocalDateTime method test_atZone.
//-----------------------------------------------------------------------
// atZone()
//-----------------------------------------------------------------------
@Test
public void test_atZone() {
LocalDateTime t = LocalDateTime.of(2008, 6, 30, 11, 30);
assertEquals(t.atZone(ZONE_PARIS), ZonedDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), ZONE_PARIS));
}
use of java.time.LocalDateTime in project jdk8u_jdk by JetBrains.
the class TCKLocalDateTime method test_plusMonths_int_overYears.
@Test
public void test_plusMonths_int_overYears() {
LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(25);
check(t, 2009, 8, 15, 12, 30, 40, 987654321);
}
use of java.time.LocalDateTime in project jdk8u_jdk by JetBrains.
the class TCKLocalDateTime method test_plusDays_overMonths.
@Test
public void test_plusDays_overMonths() {
LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(62);
check(t, 2007, 9, 15, 12, 30, 40, 987654321);
}
use of java.time.LocalDateTime in project jdk8u_jdk by JetBrains.
the class TCKLocalDateTime method test_minusWeeks_negative.
@Test
public void test_minusWeeks_negative() {
LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(-1);
check(t, 2007, 7, 22, 12, 30, 40, 987654321);
}
Aggregations