/
Stub.kt
47 lines (29 loc) · 1.14 KB
/
Stub.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package io.mockk.impl.stub
import io.mockk.*
import io.mockk.MockKGateway.ExclusionParameters
import io.mockk.impl.platform.Disposable
import kotlin.reflect.KClass
interface Stub : Disposable {
val name: String
val type: KClass<*>
fun addAnswer(matcher: InvocationMatcher, answer: Answer<*>)
fun answer(invocation: Invocation): Any?
fun childMockK(matcher: InvocationMatcher, childType: KClass<*>): Any
fun recordCall(invocation: Invocation)
fun allRecordedCalls(): List<Invocation>
fun allRecordedCalls(method: MethodDescription): List<Invocation>
fun excludeRecordedCalls(params: ExclusionParameters, matcher: InvocationMatcher)
fun markCallVerified(invocation: Invocation)
fun verifiedCalls(): List<Invocation>
fun matcherUsages(): Map<InvocationMatcher, Int>
fun clear(options: MockKGateway.ClearOptions)
fun handleInvocation(
self: Any,
method: MethodDescription,
originalCall: () -> Any?,
args: Array<out Any?>,
fieldValueProvider: BackingFieldValueProvider
): Any?
fun toStr(): String
fun stdObjectAnswer(invocation: Invocation): Any?
}