FakeClock class
A deterministic clock for tests.
Pass clock.now to a LoggerConfig.clock field to make every event
stamped with a controlled timestamp. Advance time by calling
advance or set it explicitly with setNow.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
advance(
Duration delta) → void -
Advances the clock by
delta. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
now(
) → DateTime -
The current fake "now". Pass this method as
clock.nowto a LoggerConfig. -
setNow(
DateTime value) → void -
Replaces the current "now" with
value. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited