TestGate<T extends Object> class final

A deterministic one-value gate for coordinating asynchronous tests.

Prefer this to arbitrary sleeps when a test needs to control exactly when an Effect or resource acquisition continues.

Constructors

TestGate()

Properties

future Future<T>
Future awaited by the code under test.
no setter
hashCode int
The hash code for this object.
no setterinherited
isCompleted bool
Whether this gate was completed successfully or with an error.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

complete(T value) → void
Open the gate with value.
completeError(Object error, [StackTrace? stackTrace]) → void
Open the gate with an asynchronous failure.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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