mock Execute
fun <ARGS, RETURN_VALUE, USE_CASE : FlowUseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(args: ARGS, returnBlock: () -> Flow<RETURN_VALUE>)
Content copied to clipboard
fun <ARGS, RETURN_VALUE, USE_CASE : UseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(args: ARGS, returnBlock: () -> RETURN_VALUE)
Content copied to clipboard
Mock CoroutineScopeOwner.execute method.
When the execute method will be called then the argument passed in returnBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called.
Usage: mockUseCase.mockExecute(args = ...) { ... }
inline fun <ARGS : Any, RETURN_VALUE, USE_CASE : FlowUseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(returnBlock: () -> Flow<RETURN_VALUE>)
Content copied to clipboard
inline fun <ARGS : Any, RETURN_VALUE, USE_CASE : UseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(crossinline returnBlock: () -> RETURN_VALUE)
Content copied to clipboard
Mock CoroutineScopeOwner.execute method with any() matcher argument used as input argument.
When the execute method will be called then the argument passed in returnBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called.
Usage: mockUseCase.mockExecute { ... }