StubBuilder class

Fluent terminator returned by MockAdapter.when.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
thenRespond(List<MockReply> replies) → void
Advanced — mix successful responses and thrown exceptions.
thenReturn(HttpResponse response) → void
The stub returns response for every matching request.
thenReturnInOrder(List<HttpResponse> responses) → void
The stub returns each responses entry once, then sticks on the last.
thenThrow(HttpAdapterException exception) → void
The stub throws exception for every matching request.
toString() String
A string representation of this object.
inherited
withDelay(Duration delay) StubBuilder
Inject an artificial delay before the response fires.

Operators

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