Dagger 1 mocking modules in extended graph (example project included)

46 views Asked by At

I have a problem mocking a module with Dagger 1.

Essentially I'd like my application-module to provide some 'global' bindings and my activity-module to add to said module and provide the bindings only used in activities.

For testing I now added some mocking capabilities. Mocking the binding from the application-module works fine, mocking the binding from the activity-module does not.

I created an example project where 2 out of 3 tests fail (those in which I check for the mock-dependency to be present).

https://github.com/mknudsen/dagger-module-overrides-example

0

There are 0 answers