StreamChecks<T> extension
Expectations on a StreamQueue
.
Streams should be wrapped in user test code so that any reuse of the same Stream, and the full stream lifecycle, is explicit.
- on
-
- Subject<
StreamQueue< T> >
- Subject<
Methods
-
anyOf(
Iterable< AsyncCondition< conditions) → Future<StreamQueue< >T> >void> -
Expects that the stream statisfies at least one condition from
conditions
. -
emits(
[AsyncCondition< T> ? emittedCondition]) → Future<void> -
Expect that the
Stream
emits a value without first emitting an error. -
emitsError<
E extends Object> ([AsyncCondition< E> ? errorCondition]) → Future<void> -
Expects that the stream emits an error of type
E
. -
emitsThrough(
AsyncCondition< T> condition) → Future<void> -
Expects that the
Stream
emits any number of events before emitting an event that satisfiescondition
. -
inOrder(
Iterable< AsyncCondition< conditions) → Future<StreamQueue< >T> >void> -
Expects that the stream satisfies each condition in
conditions
serially. -
isDone(
) → Future< void> - Expects that the stream closes without emitting any events or errors.
-
mayEmit(
AsyncCondition< T> condition) → Future<void> -
Optionally consumes an event that matches
condition
from the stream. -
mayEmitMultiple(
AsyncCondition< T> condition) → Future<void> -
Optionally consumes events that match
condition
from the stream. -
neverEmits(
AsyncCondition< T> condition) → Future<void> -
Expects that the stream closes without emitting any event that satisfies
condition
.