koin-test / org.koin.test.mock

Package org.koin.test.mock

Extensions for External Classes

org.koin.core.Koin

org.koin.core.definition.BeanDefinition

Functions

declare

fun KoinTest.declare(moduleDeclaration: ModuleDeclaration): Unit

Declare component on the fly

declareMock

fun <T : Any> KoinTest.declareMock(qualifier: Qualifier? = null, stubbing: T.() -> Unit = null): T

Declare & Create a mock in Koin container for given type

getDefinition

fun <T : Any> getDefinition(clazz: KClass<T>, koin: Koin, qualifier: Qualifier?): BeanDefinition<T>