All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.mockk.impl.stub.Stub.kt Maven / Gradle / Ivy

There is a newer version: 1.13.12
Show newest version
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<*>

    val threadId: Long

    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

    fun allRecordedCalls(method: MethodDescription): List

    fun excludeRecordedCalls(params: ExclusionParameters, matcher: InvocationMatcher)

    fun markCallVerified(invocation: Invocation)

    fun verifiedCalls(): List

    fun matcherUsages(): Map

    fun clear(options: MockKGateway.ClearOptions)

    fun handleInvocation(
        self: Any,
        method: MethodDescription,
        originalCall: () -> Any?,
        args: Array,
        fieldValueProvider: BackingFieldValueProvider
    ): Any?

    fun toStr(): String

    fun stdObjectAnswer(invocation: Invocation): Any?
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy