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