Package com.atlassian.crowd.test.util
Class SettableClock
java.lang.Object
java.time.Clock
com.atlassian.crowd.test.util.SettableClock
- All Implemented Interfaces:
InstantSource
It's a
Clock
that can be set, for tests
Use applicationContext-testClock.xml to inject it into your tests and make it override the system clock.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.time.Clock
equals, fixed, hashCode, millis, offset, system, systemDefaultZone, systemUTC, tick, tickMillis, tickMinutes, tickSeconds
-
Constructor Details
-
SettableClock
public SettableClock() -
SettableClock
public SettableClock(long epochMilli) -
SettableClock
-
-
Method Details
-
getZone
-
withZone
- Specified by:
withZone
in interfaceInstantSource
- Specified by:
withZone
in classClock
-
instant
- Specified by:
instant
in interfaceInstantSource
- Specified by:
instant
in classClock
-
addMillis
public void addMillis(long millis) -
setEpochMillis
public void setEpochMillis(long epochMilli)
-