Mock KStub Scope
class MockKStubScope<T, B>( answerOpportunity: MockKGateway.AnswerOpportunity<T>, callRecorder: MockKGateway.CallRecorder, lambda: CapturingSlot<Function<*>>)
Content copied to clipboard
Stub scope. Part of DSL
Allows to specify function result
Constructors
Link copied to clipboard
fun <T> MockKStubScope( answerOpportunity: MockKGateway.AnswerOpportunity<T>, callRecorder: MockKGateway.CallRecorder, lambda: CapturingSlot<Function<*>>)
Content copied to clipboard
Functions
Link copied to clipboard
infix fun coAnswers(answer: suspend MockKAnswerScope<T, B>.(Call) -> T): MockKAdditionalAnswerScope<T, B>
Content copied to clipboard
Link copied to clipboard
infix fun <K : Any> nullablePropertyType(cls: KClass<K>): MockKStubScope<T, K?>
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns the nth argument of what has been called.
Link copied to clipboard
Extensions
Link copied to clipboard
infix fun MockKStubScope<Unit, Unit>.just(runs: Runs): MockKAdditionalAnswerScope<Unit, Unit>
Content copied to clipboard
Part of DSL. Answer placeholder for Unit returning functions.