TestSyncWorkerLoop class
A SyncWorkerLoop for testing.
- Inheritance
-
- Object
- SyncWorkerLoop
- TestSyncWorkerLoop
- Implemented types
Constructors
- TestSyncWorkerLoop(SyncWorkerConnection connection, {String? printMessage})
Properties
- connection → SyncWorkerConnection
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- printMessage → String?
-
If set, this message will be printed during the call to
performRequest
.final -
requests
→ List<
WorkRequest> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
enqueueResponse(
WorkResponse response) → void -
Adds
response
to the queue. These will be returned from performRequest in the order they are added, otherwise it will throw if the queue is empty.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performRequest(
WorkRequest request) → WorkResponse -
Perform a single WorkRequest, and return a WorkResponse.
override
-
run(
) → void -
Run the worker loop. Blocks until
connection#readRequest
returnsnull
.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited