MockServer<T> class abstract

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.
no setterinherited
isEmpty bool
Whether or not there are any messages that have been sent to this instance but have yet to be read.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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 nonexistent 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