use of io.spine.time.LocalTime in project core-java by SpineEventEngine.
the class OffsetTimesShould method subtract_millis.
@Test
public void subtract_millis() {
final int millisDelta = random(1, 999_999);
final Duration deltaDuration = Durations.fromMillis(millisDelta);
final Timestamp gmtPast = Timestamps.subtract(gmtNow, deltaDuration);
final LocalTime expectedPast = LocalTimes.timeAt(gmtPast, zoneOffset);
final LocalTime actualPast = subtractMillis(now, millisDelta).getTime();
assertEquals(expectedPast, actualPast);
}
use of io.spine.time.LocalTime in project core-java by SpineEventEngine.
the class TimeChangesShould method do_not_accept_null_LocalTime_previousValue.
@Test(expected = NullPointerException.class)
public void do_not_accept_null_LocalTime_previousValue() {
final LocalTime now = LocalTimes.now();
TimeChanges.of(null, now);
}
use of io.spine.time.LocalTime in project core-java by SpineEventEngine.
the class ChangesShould method do_not_accept_equal_LocalTime_values.
@Test(expected = IllegalArgumentException.class)
public void do_not_accept_equal_LocalTime_values() {
final LocalTime now = LocalTimes.now();
Changes.of(now, now);
}
use of io.spine.time.LocalTime in project core-java by SpineEventEngine.
the class ChangesShould method do_not_accept_null_LocalTime_previousValue.
@Test(expected = NullPointerException.class)
public void do_not_accept_null_LocalTime_previousValue() {
final LocalTime now = LocalTimes.now();
Changes.of(null, now);
}
Aggregations