MokkeryInstanceConfigurer

MokkeryConfigurer for MokkeryInstanceScope.

This configurer is not used directly as context parameter with mock/spy blocks. Aware is used instead. It's caused by the fact that a declaration with this configurer as a context parameter loses resolution to a declaration of the same name available on an outer receiver (e.g. an enclosing dev.mokkery.MokkerySuiteScope). With Aware, such declarations are extensions on the configured instance, so they resolve correctly.

Inheritors

Types

Link copied to clipboard
interface Aware<in T : Any, out C : MokkeryInstanceConfigurer>

Provides the MokkeryInstanceConfigurer of type C for the configured instance of type T.

Link copied to clipboard
typealias Block<T, C> = context(MokkeryInstanceConfigurer.Aware<T, C>) T.() -> Unit

Configuration block for an instance of type T with a configurer of type C.

Properties

Link copied to clipboard

Returns MokkeryCallHooks associated with this scope. See MokkeryCallHooks for details on hook scoping.

Link copied to clipboard

MokkeryContext of the configured object. Assigning a new value applies it to the configured object.

Functions

Link copied to clipboard

Removes element with key from mokkeryContext.

Link copied to clipboard

Adds context to mokkeryContext.