Skip to content

//workflow/com.squareup.workflow1.testing/WorkerTester

WorkerTester

[jvm] interface WorkerTester<T>

Functions

Name Summary
assertFinished [jvm]
Content
abstract suspend fun assertFinished()
More info
Suspends until the worker emits an output or finishes.


assertNoOutput [jvm]
Content
abstract fun assertNoOutput()
More info
Throws an AssertionError if an output has been emitted since the last call to nextOutput.


assertNotFinished [jvm]
Content
abstract fun assertNotFinished()
More info
Throws an AssertionError immediately if the worker is finished.


cancelWorker [jvm]
Content
abstract suspend fun cancelWorker()
More info
Cancels the worker and suspends until it’s finished cancelling (joined).


getException [jvm]
Content
abstract suspend fun getException(): Throwable
More info
Suspends until the worker throws an exception, then returns it.


nextOutput [jvm]
Content
abstract suspend fun nextOutput(): T
More info
Suspends until the worker emits its next value, then returns it.