Search in sources :

Example 86 with OffsetTime

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));
}
Also used : OffsetTime(java.time.OffsetTime) Test(org.testng.annotations.Test)

Example 87 with OffsetTime

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));
}
Also used : OffsetTime(java.time.OffsetTime) MockSimplePeriod(test.java.time.MockSimplePeriod) Test(org.testng.annotations.Test)

Example 88 with OffsetTime

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);
}
Also used : OffsetTime(java.time.OffsetTime) Test(org.testng.annotations.Test)

Example 89 with OffsetTime

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);
}
Also used : OffsetTime(java.time.OffsetTime) Test(org.testng.annotations.Test)

Example 90 with OffsetTime

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));
}
Also used : OffsetTime(java.time.OffsetTime) Test(org.testng.annotations.Test)

Aggregations

OffsetTime (java.time.OffsetTime)99 Test (org.testng.annotations.Test)86 ZonedDateTime (java.time.ZonedDateTime)9 LocalTime (java.time.LocalTime)8 Instant (java.time.Instant)7 OffsetDateTime (java.time.OffsetDateTime)7 Time (java.sql.Time)6 LocalDate (java.time.LocalDate)6 LocalDateTime (java.time.LocalDateTime)6 Test (org.junit.Test)6 Date (java.sql.Date)3 ResultSet (java.sql.ResultSet)3 Clock (java.time.Clock)3 PostgresUtils.toPGArrayString (org.jooq.util.postgres.PostgresUtils.toPGArrayString)3 BigDecimal (java.math.BigDecimal)2 PreparedStatement (java.sql.PreparedStatement)2 Timestamp (java.sql.Timestamp)2 Duration (java.time.Duration)2 Period (java.time.Period)2 ZoneId (java.time.ZoneId)2