getClock abstract method

Clock getClock(
  1. DateTime initialTime
)

Returns a fake Clock whose time can is elapsed by calls to elapse and elapseBlocking.

The returned clock starts at initialTime, and calls to elapse and elapseBlocking advance the clock, even if they occurred before the call to this method.

The clock can be passed as a dependency to the unit under test.

Implementation

Clock getClock(DateTime initialTime);