TestScheduler class

Inheritance

Constructors

TestScheduler()

Properties

hashCode int
The hash code for this object.
no setterinherited
hasPending bool
Returns true, if there are actions pending.
no setterinherited
now DateTime
Returns the current time.
no setteroverride
observables List<TestObservable>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheduled SplayTreeMap<DateTime, List<SchedulerAction>>
Sorted list of pending actions.
finalinherited
stepDuration Duration
Returns the stepping time in this test scenario.
no setter
subscribers List<TestSubscriber>
final

Methods

advance([DateTime? dateTime]) → void
Advances the time to dateTime. If omitted advance to the timestamp of the next scheduled action. If no scheduled action is present, keep the current timestamp and only flush pending immediate actions.
advanceAll() → void
Advances the time as far as possible and execute all existing and new pending actions on the way.
cold<T>(String marbles, {Map<String, T> values = const {}, Object error = 'Error'}) Observable<T>
Creates a "cold" Observable whose events replay each time it is being subscribed to.
flush() → void
Performs all the eligible pending actions.
inherited
hot<T>(String marbles, {Map<String, T> values = const {}, Object error = 'Error'}) Observable<T>
Creates a "hot" Observable whose event start replaying immediately and where subscribers all share the same unique run.
isObservable<T>(String marbles, {Map<String, T> values = const {}, Object error = 'Error'}) → Matcher
Creates a matcher for an observable.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
schedule(Callback0 callback) Disposable
Schedules a callback to be executed.
inherited
scheduleAbsolute(DateTime dateTime, Callback0 callback) Disposable
Schedules a callback to be executed at the specified dateTime.
inherited
scheduleIteration(Predicate0 callback) Disposable
Schedules a callback to be executed while its return value is true.
inherited
schedulePeriodic(Duration duration, Callback1<Disposable> callback) Disposable
Schedules a callback to be executed periodically every duration.
inherited
scheduleRelative(Duration duration, Callback0 callback) Disposable
Schedules a callback to be executed after the specified duration.
inherited
setUp() → void
Installs the test scheduler, typically done in setUp method of test.
tearDown() → void
Uninstall the test scheduler, typically done in tearDown method of test.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited