mockExecute

inline fun <ARGS : Any, USE_CASE : CompletableUseCase<ARGS>> USE_CASE.mockExecute(args: ARGS, resultBlock: () -> Completable)

Mock CompletableDisposablesOwner.execute method.

When the execute method will be called then the argument passed in resultBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called. So when Completable.complete will be passed then onComplete will be called etc.

Usage: mockCompletableUseCase.mockExecute(args = ...) { Completable.complete() }

inline fun <ARGS : Any, USE_CASE : CompletableUseCase<ARGS>> USE_CASE.mockExecute(resultBlock: () -> Completable)

Mock CompletableDisposablesOwner.execute method with any() matcher argument used as input argument.

When the execute method will be called then the argument passed in resultBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called. So when Completable.complete will be passed then onComplete will be called etc.

Usage: mockCompletableUseCase.mockExecute(args = ...) { Completable.complete() }

inline fun <ARGS : Any, RETURN_VALUE, USE_CASE : FlowableUseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(args: ARGS, resultBlock: () -> Flowable<RETURN_VALUE>)

Mock FlowableDisposablesOwner.execute method.

When the execute method will be called then the argument passed in resultBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called. So when Flowable.just will be passed then onNext will be called etc.

Usage: mockFlowableUseCase.mockExecute(args = ...) { Flowable.just(...) }

inline fun <ARGS : Any, RETURN_VALUE, USE_CASE : FlowableUseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(resultBlock: () -> Flowable<RETURN_VALUE>)

Mock FlowableDisposablesOwner.execute method with any() matcher argument used as input argument.

When the execute method will be called then the argument passed in resultBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called. So when Flowable.just will be passed then onNext will be called etc.

Usage: mockFlowableUseCase.mockExecute(args = ...) { Flowable.just(...) }

inline fun <ARGS : Any, RETURN_VALUE, USE_CASE : MaybeUseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(args: ARGS, resultBlock: () -> Maybe<RETURN_VALUE>)

Mock MaybeDisposablesOwner.execute method.

When the execute method will be called then the argument passed in resultBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called. So when Maybe.just will be passed then onNext will be called etc.

Usage: mockMaybeUseCase.mockExecute(args = ...) { Maybe.just(...) }

inline fun <ARGS : Any, RETURN_VALUE, USE_CASE : MaybeUseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(resultBlock: () -> Maybe<RETURN_VALUE>)

Mock MaybeDisposablesOwner.execute method with any() matcher argument used as input argument.

When the execute method will be called then the argument passed in resultBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called. So when Maybe.just will be passed then onNext will be called etc.

Usage: mockMaybeUseCase.mockExecute(args = ...) { Maybe.just(...) }

inline fun <ARGS : Any, RETURN_VALUE, USE_CASE : ObservableUseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(args: ARGS, resultBlock: () -> Observable<RETURN_VALUE>)

Mock ObservableDisposablesOwner.execute method.

When the execute method will be called then the argument passed in resultBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called. So when Observable.just will be passed then onNext will be called etc.

Usage: mockObservableUseCase.mockExecute(args = ...) { Observable.just(...) }

inline fun <ARGS : Any, RETURN_VALUE, USE_CASE : ObservableUseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(resultBlock: () -> Observable<RETURN_VALUE>)

Mock ObservableDisposablesOwner.execute method with any() matcher argument used as input argument.

When the execute method will be called then the argument passed in resultBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called. So when Observable.just will be passed then onNext will be called etc.

Usage: mockObservableUseCase.mockExecute(args = ...) { Observable.just(...) }

inline fun <ARGS : Any, RETURN_VALUE, USE_CASE : SingleUseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(args: ARGS, resultBlock: () -> Single<RETURN_VALUE>)

Mock SingleDisposablesOwner.execute method.

When the execute method will be called then the argument passed in resultBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called. So when Single.just will be passed then onSuccess will be called etc.

Usage: mockSingleUseCase.mockExecute(args = ...) { Single.just(...) }

inline fun <ARGS : Any, RETURN_VALUE, USE_CASE : SingleUseCase<ARGS, RETURN_VALUE>> USE_CASE.mockExecute(resultBlock: () -> Single<RETURN_VALUE>)

Mock SingleDisposablesOwner.execute method with any() matcher argument used as input argument.

When the execute method will be called then the argument passed in resultBlock will be used as a result of mocked use case and corresponding methods for the given use case will be called. So when Single.just will be passed then onSuccess will be called etc.

Usage: mockSingleUseCase.mockExecute { Single.just(...) }