use of java.time.OffsetTime in project jdk8u_jdk by JetBrains.
the class TCKOffsetTime method test_plusNanos.
//-----------------------------------------------------------------------
// plusNanos()
//-----------------------------------------------------------------------
@Test
public void test_plusNanos() {
OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
OffsetTime test = base.plusNanos(1);
assertEquals(test, OffsetTime.of(11, 30, 59, 1, OFFSET_PONE));
}
use of java.time.OffsetTime in project jdk8u_jdk by JetBrains.
the class TCKOffsetTime method test_plus_PlusAdjuster_zero.
@Test
public void test_plus_PlusAdjuster_zero() {
OffsetTime t = TEST_11_30_59_500_PONE.plus(Period.ZERO);
assertEquals(t, TEST_11_30_59_500_PONE);
}
use of java.time.OffsetTime in project jdk8u_jdk by JetBrains.
the class TCKOffsetTime method test_with_adjustment_LocalTime.
@Test
public void test_with_adjustment_LocalTime() {
OffsetTime test = TEST_11_30_59_500_PONE.with(LocalTime.of(13, 30));
assertEquals(test, OffsetTime.of(13, 30, 0, 0, OFFSET_PONE));
}
use of java.time.OffsetTime in project jdk8u_jdk by JetBrains.
the class TCKOffsetTime method test_with_adjustment_ZoneOffset.
@Test
public void test_with_adjustment_ZoneOffset() {
OffsetTime test = TEST_11_30_59_500_PONE.with(OFFSET_PTWO);
assertEquals(test, OffsetTime.of(11, 30, 59, 500, OFFSET_PTWO));
}
use of java.time.OffsetTime in project jdk8u_jdk by JetBrains.
the class TCKOffsetTime method test_plusNanos_zero.
@Test
public void test_plusNanos_zero() {
OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
OffsetTime test = base.plusNanos(0);
assertEquals(test, base);
}
Aggregations