Search in sources :

Example 26 with OffsetDateTime

use of java.time.OffsetDateTime in project jdk8u_jdk by JetBrains.

the class TestOffsetDateTime method test_minusNanos_zero.

@Test
public void test_minusNanos_zero() {
    OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
    OffsetDateTime test = base.minusNanos(0);
    assertSame(test, base);
}
Also used : OffsetDateTime(java.time.OffsetDateTime) Test(org.testng.annotations.Test)

Example 27 with OffsetDateTime

use of java.time.OffsetDateTime in project jdk8u_jdk by JetBrains.

the class TestOffsetDateTime method test_withYear_noChange.

@Test
public void test_withYear_noChange() {
    OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
    OffsetDateTime test = base.withYear(2008);
    assertSame(test, base);
}
Also used : OffsetDateTime(java.time.OffsetDateTime) Test(org.testng.annotations.Test)

Example 28 with OffsetDateTime

use of java.time.OffsetDateTime in project jdk8u_jdk by JetBrains.

the class TestOffsetDateTime method test_plus_Period_zero.

@Test
public void test_plus_Period_zero() {
    OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus(MockSimplePeriod.ZERO_DAYS);
    assertSame(t, TEST_2008_6_30_11_30_59_000000500);
}
Also used : OffsetDateTime(java.time.OffsetDateTime) Test(org.testng.annotations.Test)

Example 29 with OffsetDateTime

use of java.time.OffsetDateTime in project jdk8u_jdk by JetBrains.

the class TestOffsetDateTime method test_withSecond_noChange.

@Test
public void test_withSecond_noChange() {
    OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
    OffsetDateTime test = base.withSecond(59);
    assertSame(test, base);
}
Also used : OffsetDateTime(java.time.OffsetDateTime) Test(org.testng.annotations.Test)

Example 30 with OffsetDateTime

use of java.time.OffsetDateTime in project jdk8u_jdk by JetBrains.

the class TestOffsetDateTime method test_minusMinutes_zero.

@Test
public void test_minusMinutes_zero() {
    OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
    OffsetDateTime test = base.minusMinutes(0);
    assertSame(test, base);
}
Also used : OffsetDateTime(java.time.OffsetDateTime) Test(org.testng.annotations.Test)

Aggregations

OffsetDateTime (java.time.OffsetDateTime)191 Test (org.testng.annotations.Test)139 Instant (java.time.Instant)22 Test (org.junit.Test)20 ZonedDateTime (java.time.ZonedDateTime)17 LocalDateTime (java.time.LocalDateTime)12 LocalDate (java.time.LocalDate)11 LocalTime (java.time.LocalTime)10 Timestamp (java.sql.Timestamp)6 OffsetTime (java.time.OffsetTime)6 ChronoZonedDateTime (java.time.chrono.ChronoZonedDateTime)6 Map (java.util.Map)6 Date (java.sql.Date)4 Clock (java.time.Clock)4 ZoneOffset (java.time.ZoneOffset)4 DateTimeFormatter (java.time.format.DateTimeFormatter)4 Collections.emptyMap (java.util.Collections.emptyMap)4 UUID (java.util.UUID)4 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)4 MapUtil.stringMap (org.neo4j.helpers.collection.MapUtil.stringMap)4