matchQueue method

Future<String> matchQueue (StreamQueue queue)

Tries to match events emitted by queue.

If this matches successfully, it consumes the matching events from queue and returns null.

If this fails to match, it doesn't consume any events and returns a description of the failure. This description is in the past tense, and could grammatically be used after "the stream". For example, it might return "emitted the wrong events".

The description string may also be empty, which indicates that the matcher's description and the events actually emitted by the stream are enough to understand the failure.

If the queue emits an error, that error is re-thrown unless otherwise indicated by the matcher.

Implementation

Future<String> matchQueue(StreamQueue queue);