use of java.time.LocalTime in project jdk8u_jdk by JetBrains.
the class TCKLocalTime method test_minusMinutes_noChange_equal.
@Test
public void test_minusMinutes_noChange_equal() {
LocalTime t = TEST_12_30_40_987654321.minusMinutes(0);
assertEquals(t, TEST_12_30_40_987654321);
}
use of java.time.LocalTime in project jdk8u_jdk by JetBrains.
the class TCKLocalTime method test_atDate.
//-----------------------------------------------------------------------
// atDate()
//-----------------------------------------------------------------------
@Test
public void test_atDate() {
LocalTime t = LocalTime.of(11, 30);
assertEquals(t.atDate(LocalDate.of(2012, 6, 30)), LocalDateTime.of(2012, 6, 30, 11, 30));
}
use of java.time.LocalTime in project jdk8u_jdk by JetBrains.
the class TCKLocalTime method test_minusSeconds_fromZero.
@Test(dataProvider = "minusSeconds_fromZero")
public void test_minusSeconds_fromZero(int seconds, int hour, int min, int sec) {
LocalTime base = LocalTime.MIDNIGHT;
LocalTime t = base.minusSeconds(seconds);
assertEquals(t.getHour(), hour);
assertEquals(t.getMinute(), min);
assertEquals(t.getSecond(), sec);
}
use of java.time.LocalTime in project jdk8u_jdk by JetBrains.
the class TCKLocalTime method test_minus_TemporalAmount_zero.
@Test
public void test_minus_TemporalAmount_zero() {
TemporalAmount period = Period.ZERO;
LocalTime t = TEST_12_30_40_987654321.minus(period);
assertEquals(t, TEST_12_30_40_987654321);
}
use of java.time.LocalTime in project jdk8u_jdk by JetBrains.
the class TCKLocalTime method test_minusHours_toMidday_equal.
@Test
public void test_minusHours_toMidday_equal() {
LocalTime t = LocalTime.of(13, 0).minusHours(1);
assertEquals(t, LocalTime.NOON);
}
Aggregations