public class FakeTimeProvider extends Object implements TimeProvider
getTime(), consider using a mock of TimeProvider instead.| Modifier and Type | Method and Description |
|---|---|
void |
addTime(TemporalAmount toAdd)
Increases stored time by given amount.
|
static FakeTimeProvider |
create(ZonedDateTime initialTime)
Creates a fake time provider with given time.
|
ZonedDateTime |
getTime()
Returns the current time of this time provider in UTC time zone.
|
void |
setTime(ZonedDateTime time)
Sets new time for this time provider.
|
public static FakeTimeProvider create(ZonedDateTime initialTime)
IllegalArgumentException - if value has time zone other than UTCpublic void setTime(ZonedDateTime time)
IllegalArgumentException - if value has time zone other than UTCpublic void addTime(TemporalAmount toAdd)
public ZonedDateTime getTime()
TimeProvidergetTime in interface TimeProviderCopyright © 2019 Exonum. All rights reserved.