https://kotlinlang.org logo
#kodein
Title
a

Alec Muffett

11/03/2020, 7:48 AM
Quick Question: if I am implementing an extension method for a Java class, what's the best practice for pushing DI/Kodein into the extension method? There's some behaviour configuration which I want to be able to vary in tests, but I don't have a clear factory pattern to work with because extension methods are resolved statically.
s

salomonbrys

11/03/2020, 9:43 AM
I don't see any other way than to pass the
DI
container as a parameter
👍 1