mockito-kotlin / org.mockito.kotlin / wheneverBlocking

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!