use of io.spine.time.ZoneOffset in project core-java by SpineEventEngine.
the class TimeChangesShould 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);
TimeChanges.of(null, now);
}
use of io.spine.time.ZoneOffset in project core-java by SpineEventEngine.
the class TimeChangesShould 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);
TimeChanges.of(date, null);
}
use of io.spine.time.ZoneOffset in project core-java by SpineEventEngine.
the class TimeChangesShould method do_not_accept_null_OffsetTime_previousValue.
@Test(expected = NullPointerException.class)
public void do_not_accept_null_OffsetTime_previousValue() {
final ZoneOffset inLassVegas = ZoneOffsets.ofHours(8);
final OffsetTime now = OffsetTimes.now(inLassVegas);
TimeChanges.of(null, now);
}
use of io.spine.time.ZoneOffset in project core-java by SpineEventEngine.
the class TimeChangesShould 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);
TimeChanges.of(null, date);
}
use of io.spine.time.ZoneOffset in project core-java by SpineEventEngine.
the class CommandFactoryShould method create_command_context.
@Test
public void create_command_context() {
final TenantId tenantId = GivenTenantId.newUuid();
final UserId userId = GivenUserId.newUuid();
final ZoneOffset zoneOffset = ZoneOffsets.ofHours(-3);
final int targetVersion = 100500;
final CommandContext commandContext = CommandFactory.createContext(tenantId, userId, zoneOffset, targetVersion);
final ActorContext actorContext = commandContext.getActorContext();
assertEquals(tenantId, actorContext.getTenantId());
assertEquals(userId, actorContext.getActor());
assertEquals(zoneOffset, actorContext.getZoneOffset());
assertEquals(targetVersion, commandContext.getTargetVersion());
}
Aggregations