use of java.time.OffsetTime in project jdk8u_jdk by JetBrains.
the class TCKOffsetTime method test_plusMinutes.
//-----------------------------------------------------------------------
// plusMinutes()
//-----------------------------------------------------------------------
@Test
public void test_plusMinutes() {
OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
OffsetTime test = base.plusMinutes(30);
assertEquals(test, OffsetTime.of(12, 0, 59, 0, OFFSET_PONE));
}
use of java.time.OffsetTime in project jdk8u_jdk by JetBrains.
the class TCKOffsetTime method test_plus_PlusAdjuster.
//-----------------------------------------------------------------------
// plus(PlusAdjuster)
//-----------------------------------------------------------------------
@Test
public void test_plus_PlusAdjuster() {
MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MINUTES);
OffsetTime t = TEST_11_30_59_500_PONE.plus(period);
assertEquals(t, OffsetTime.of(11, 37, 59, 500, OFFSET_PONE));
}
use of java.time.OffsetTime in project jdk8u_jdk by JetBrains.
the class TCKOffsetTime method test_plus_PlusAdjuster_noChange.
@Test
public void test_plus_PlusAdjuster_noChange() {
OffsetTime t = TEST_11_30_59_500_PONE.plus(MockSimplePeriod.of(0, SECONDS));
assertEquals(t, TEST_11_30_59_500_PONE);
}
use of java.time.OffsetTime in project jdk8u_jdk by JetBrains.
the class TCKOffsetTime method factory_intsHMSN.
//-----------------------------------------------------------------------
@Test
public void factory_intsHMSN() {
OffsetTime test = OffsetTime.of(11, 30, 10, 500, OFFSET_PONE);
check(test, 11, 30, 10, 500, OFFSET_PONE);
}
use of java.time.OffsetTime in project jdk8u_jdk by JetBrains.
the class TCKOffsetTime method test_with_adjustment_OffsetTime.
@Test
public void test_with_adjustment_OffsetTime() {
OffsetTime test = TEST_11_30_59_500_PONE.with(OffsetTime.of(13, 35, 0, 0, OFFSET_PTWO));
assertEquals(test, OffsetTime.of(13, 35, 0, 0, OFFSET_PTWO));
}
Aggregations