wheneverBlocking

fun <T> wheneverBlocking(methodCall: suspend CoroutineScope.() -> T): OngoingStubbing<T>

Enables stubbing suspending methods. Use it when you want the mock to return particular value when particular suspending method is called.

Warning: Only one method call can be stubbed in the function. other method calls are ignored!


fun <T> Stubber.wheneverBlocking(mock: T, f: suspend T.() -> Unit)

Alias for when with suspending function

Warning: Only one method call can be stubbed in the function. Subsequent method calls are ignored!