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);
}
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);
}
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);
}
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);
}
use of java.time.OffsetDateTime in project jdk8u_jdk by JetBrains.
the class TestOffsetDateTime method test_withOffsetSameLocal.
//-----------------------------------------------------------------------
// withOffsetSameLocal()
//-----------------------------------------------------------------------
@Test
public void test_withOffsetSameLocal() {
OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
OffsetDateTime test = base.withOffsetSameLocal(OFFSET_PTWO);
assertSame(test.toLocalDateTime(), base.toLocalDateTime());
assertSame(test.getOffset(), OFFSET_PTWO);
}
Aggregations