()
| 24 | public class ClockTest { |
| 25 | |
| 26 | @Test |
| 27 | public void fixed() throws InterruptedException { |
| 28 | Moment m = SystemClock.INSTANCE.currentTime(); |
| 29 | TimeSource<Moment> clock = FixedClock.of(m); |
| 30 | assertThat(clock.currentTime(), is(m)); |
| 31 | assertThat(clock.currentInstant(), is(m.toTemporalAccessor())); |
| 32 | |
| 33 | Thread.sleep(1000); |
| 34 | assertThat(clock.currentTime(), is(m)); |
| 35 | } |
| 36 | |
| 37 | @Test |
| 38 | public void offsetOneMinute() { |
no test coverage detected