MockServer<T> class Null safety

This class is used as a utility for testing.

Concrete implementations - like MockHTTPServer - are used to validate messages send to remote servers during testing. This allows your tests to verify any messages sent as a side-effect of an endpoint. You should be sure to close instances of this class during tearDown functions.

Implementers

Constructors

MockServer()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
isEmpty bool
Whether or not there are any messages that have been sent to this instance but have yet to be read.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

add(T value) → void
Adds an event to this server.
clear() → void
close() Future?
Concrete implementations override this method to close an event listener.
next() Future<T>
Returns an event that has been added to this server. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
open() Future
Concrete implementations override this method to open an event listener.
toString() String
A string representation of this object. [...]
inherited

Operators

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