wisp-time-testing¶
Provides
a FakeClock, an
implementation of java.time.Clock
that can be manipulated for testing components with logic that relies on clocks.
Usage¶
val clock = FakeClock()
val foo = ThingThatNeedsClock(clock)
foo.doSomething()
clock.add(2, TimeUnit.SECOND)
foo.doSomething()