Closed timrijckaert closed 2 months ago
These test should be added to the VerifyModulesTest
@Test
fun verify_inlined_dependencies_with_get() {
val module = module {
single { Simple.ComponentA() }
single { Simple.ComponentC(Simple.ComponentB(get())) }
}
try {
module.verify()
} catch (e: MissingKoinDefinitionException) {
fail("Should not fail to verify module - $e")
}
}
@Test
fun verify_inlined_dependencies() {
val module = module {
single { Simple.ComponentC(Simple.ComponentB(Simple.ComponentA())) }
}
try {
module.verify()
} catch (e: MissingKoinDefinitionException) {
fail("Should not fail to verify module - $e")
}
}
@Test
fun verify_inlined_dependency() {
val module = module {
single { Simple.ComponentB(Simple.ComponentA()) }
}
try {
module.verify()
} catch (e: MissingKoinDefinitionException) {
fail("Should not fail to verify module - $e")
}
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug I'm trying to verify my graph where I have a lot of dependencies that should not be exposed on the graph. Instead some dependencies are inlined in the constructor.
It seems
koin-test
does not take this into account and failsExpected behavior Test should pass as it should take into account inlined dependencies.
Koin module and version:
koin-core:3.5.0
Snippet or Sample project to help reproduce