Autofill

Used whenever there is no defined answer for a call to mock that is in dev.mokkery.MockMode.autofill. Refer to AutofillProvider.forMockMode to read more about returned values.

Functions

Link copied to clipboard
open fun call(scope: FunctionScope): Any?

DEPRECATED: Use call with MokkeryBlockingCallScope instead!

open override fun call(scope: MokkeryCallScope): Any?

open override fun call(scope: MokkeryBlockingCallScope): Any?

Provides a return value for a blocking function call with given scope.

open suspend override fun call(scope: MokkerySuspendCallScope): Any?

Provides a return value for a suspend function call with given scope.

Link copied to clipboard
open suspend fun callSuspend(scope: FunctionScope): Any?

DEPRECATED: Use call with MokkerySuspendCallScope instead!

Link copied to clipboard
open fun description(): String

Returns human-readable answer description. By default, it returns answers $this. It's used for debugging purposes.