Matthieu Stombellini
04/06/2020, 4:51 PMInstance creation error : could not create instance for [Single:'<http://class.that.should.be|class.that.should.be>.injected.ClassName']: java.lang.IllegalStateException: No Koin Context configured. Please use startKoin or koinApplication DSL. when using checkModules like this :
@Category(CheckModuleTest::class)
class ModuleCheck : AutoCloseKoinTest() {
val config = ...
val rules = ...
@Test
fun checkEpilinkModules() {
with(ClassThatProvidesModules(config, rules)) {
checkModules {
modules(moduleOne, moduleTwo, moduleTwo)
}
}
}
}
and launching the class with IntelliJ IDEA or gradle test. Any ideas?aipok
04/06/2020, 6:56 PMstartKoin in test as well. You can wrap your checkModules call inside startKoin { checkModules{ ... } } and it should do the trickMatthieu Stombellini
04/06/2020, 7:18 PMaipok
04/06/2020, 7:49 PM