public class UseCaseKt
| Modifier and Type | Method and Description |
|---|---|
static <ARGS,RETURN_VALUE,USE_CASE extends UseCase<ARGS,RETURN_VALUE>> |
mockExecute(USE_CASE $receiver,
ARGS args,
kotlin.jvm.functions.Function0<? extends RETURN_VALUE> returnBlock)
Mock CoroutineScopeOwner.execute method.
|
public static <ARGS,RETURN_VALUE,USE_CASE extends UseCase<ARGS,RETURN_VALUE>> void mockExecute(@NotNull USE_CASE $receiver, ARGS args, @NotNull kotlin.jvm.functions.Function0<? extends RETURN_VALUE> returnBlock)
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 = ...) { ... }
returnBlock