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

commonMain.org.koin.test.mock.Declare.kt Maven / Gradle / Ivy

There is a newer version: 3.0.2-khan
Show newest version
package org.koin.test.mock

import org.koin.core.context.GlobalContext
import org.koin.dsl.ModuleDeclaration
import org.koin.dsl.module
import org.koin.test.KoinTest

/**
 * Declare component on the fly
 * @param moduleDeclaration lambda
 */
fun KoinTest.declare(moduleDeclaration: ModuleDeclaration) {
    val module = module(override = true, moduleDeclaration = moduleDeclaration)
    GlobalContext.get().modules(module)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy