TestMutableInjectionEnvironment

Interface for common utilities in test Tegral DI environments, such as UnsafeMutableEnvironment. This is mostly intended to ease writing interfaces that combine further DSLs into a single interface (such as ControllerTestContext from Tegral Web Controllers).

Functions

Link copied to clipboard
abstract fun <T : Any> createInjector(identifier: Identifier<T>, onInjection: (T) -> Unit): Injector<T>
Link copied to clipboard
open fun <T : Any> get(identifier: Identifier<T>): T
Link copied to clipboard
abstract fun getAllIdentifiers(): Sequence<Identifier<*>>
Link copied to clipboard
abstract fun <T : Any> getOrNull(identifier: Identifier<T>): T?
Link copied to clipboard
abstract fun <T : Any> getResolverOrNull(identifier: Identifier<T>): IdentifierResolver<T>?
Link copied to clipboard
abstract fun <T : Any> put(declaration: Declaration<T>)

Properties

Link copied to clipboard
abstract val components: Map<Identifier<*>, IdentifierResolver<*>>

The components that have been registered in this environment.

Link copied to clipboard
abstract val metaEnvironment: InjectionEnvironment

Inheritors

Link copied to clipboard