Hey guys :raising_hand: given I have the followin...
# kodein
s
Hey guys 🙋 given I have the following method in a "production" class:
kodein.instance<Manager>().getRandomWikiPage(language)
. My kodein implementation lookes like that:
Copy code
val kodein = Kodein {
    bind<Manager>() with refSingleton(softReference) { Manager() }
}
Now I want to test my class and override the
Manager
injection with a Mock. For that I've created (in my
test/
"package" obviously) the following "overriding code":
Copy code
val testKodein = Kodein {
    extend(kodein)
    bind<Manager>(overrides = true) with refSingleton(softReference) { MockManager() }
}
Unfortunately my
MockManager
isn't created. Instead it will call the real
Manager
from the
kodein
instance. What do I wrong? I found that https://stackoverflow.com/a/40022532 and thought that my code is correct...?!