mariodroid
05/12/2017, 5:50 AMBaseActivity
like
abstract class BaseActivity: KodeinAppCompatActivity() {
and I have a presenter like
class Presenter(foo : Foo, kodein: Lazy<Kodein>) : Presenter<ViewModel>(foo) {
private val kodein = LazyKodein { kodein.value }
val bar: Bar by kodein.instance()
I want to avoid to create the bar
instance in the main activity and pass it as parameter for the Presenter
,
but I'd like to override the behaviour of the binding for bar
as it's described in the doc so that I can mock
it , but I'm passing an instance of Lazy<KodeIn
so I'm kinda stuck, is there a better way?