use of java.time.LocalDate in project jdk8u_jdk by JetBrains.
the class TCKLocalDate method test_atTime_int_int_int_int.
@Test
public void test_atTime_int_int_int_int() {
LocalDate t = LocalDate.of(2008, 6, 30);
assertEquals(t.atTime(11, 30, 40, 50), LocalDateTime.of(2008, 6, 30, 11, 30, 40, 50));
}
use of java.time.LocalDate in project jdk8u_jdk by JetBrains.
the class TCKLocalDate method test_minusYears_long_normal.
//-----------------------------------------------------------------------
// minusYears()
//-----------------------------------------------------------------------
@Test
public void test_minusYears_long_normal() {
LocalDate t = TEST_2007_07_15.minusYears(1);
assertEquals(t, LocalDate.of(2006, 7, 15));
}
use of java.time.LocalDate in project jdk8u_jdk by JetBrains.
the class TCKLocalDate method test_plusMonths_long_negativeAcrossYear.
@Test
public void test_plusMonths_long_negativeAcrossYear() {
LocalDate t = TEST_2007_07_15.plusMonths(-7);
assertEquals(t, LocalDate.of(2006, 12, 15));
}
use of java.time.LocalDate in project jdk8u_jdk by JetBrains.
the class TCKLocalDate method test_atStartOfDay_ZoneId_null.
@Test(expectedExceptions = NullPointerException.class)
public void test_atStartOfDay_ZoneId_null() {
LocalDate t = LocalDate.of(2008, 6, 30);
t.atStartOfDay((ZoneId) null);
}
use of java.time.LocalDate in project jdk8u_jdk by JetBrains.
the class TCKLocalDate method test_plusMonths_long_normal.
//-----------------------------------------------------------------------
// plusMonths()
//-----------------------------------------------------------------------
@Test
public void test_plusMonths_long_normal() {
LocalDate t = TEST_2007_07_15.plusMonths(1);
assertEquals(t, LocalDate.of(2007, 8, 15));
}
Aggregations