use of io.spine.time.ZoneOffset in project core-java by SpineEventEngine.
the class ChangesShould method create_OffsetDateChange_instance.
@Test
public void create_OffsetDateChange_instance() {
final ZoneOffset inKiev = ZoneOffsets.ofHours(3);
final ZoneOffset inLuxembourg = ZoneOffsets.ofHours(1);
final OffsetDate previousDate = OffsetDates.now(inKiev);
final OffsetDate newDate = OffsetDates.now(inLuxembourg);
final OffsetDateChange result = Changes.of(previousDate, newDate);
assertEquals(previousDate, result.getPreviousValue());
assertEquals(newDate, result.getNewValue());
}
use of io.spine.time.ZoneOffset in project core-java by SpineEventEngine.
the class ChangesShould method do_not_accept_null_OffsetDate_newValue.
@Test(expected = NullPointerException.class)
public void do_not_accept_null_OffsetDate_newValue() {
final ZoneOffset inKiev = ZoneOffsets.ofHours(3);
final OffsetDate date = OffsetDates.now(inKiev);
Changes.of(date, null);
}
use of io.spine.time.ZoneOffset in project core-java by SpineEventEngine.
the class ChangesShould method do_not_accept_null_OffsetDate_previousValue.
@Test(expected = NullPointerException.class)
public void do_not_accept_null_OffsetDate_previousValue() {
final ZoneOffset inLassVegas = ZoneOffsets.ofHours(8);
final OffsetDate date = OffsetDates.now(inLassVegas);
Changes.of(null, date);
}
use of io.spine.time.ZoneOffset in project core-java by SpineEventEngine.
the class ChangesShould method do_not_accept_null_OffsetTime_newValue.
@Test(expected = NullPointerException.class)
public void do_not_accept_null_OffsetTime_newValue() {
final ZoneOffset inKiev = ZoneOffsets.ofHours(3);
final OffsetTime now = OffsetTimes.now(inKiev);
Changes.of(now, null);
}
use of io.spine.time.ZoneOffset in project core-java by SpineEventEngine.
the class ChangesShould method do_not_accept_null_OffsetDateTime_previousValue.
@Test(expected = NullPointerException.class)
public void do_not_accept_null_OffsetDateTime_previousValue() {
final ZoneOffset inLassVegas = ZoneOffsets.ofHours(8);
final OffsetDateTime now = OffsetDateTimes.now(inLassVegas);
Changes.of(null, now);
}
Aggregations