I would like to inject mocked overrides into my Android instrumentation tests using Kodein. I don't know which is the optimal approach to do this. Here's what I have in mind:
- My app uses a
KodeinAware
application class. The served Kodein instance holds all dependencies required by my app. - In my tests I would like to inject mocked overrides for specific dependencies to test behavior of the app in various situations.
- Overrides should be different for each test, and should be injected before/while the test runs.
Is the configurable Kodein extension sensible in this situation, or is there a simpler, better suited approach (and if so, which)?