Dependency Provision Precendence in Dagger

Viewed 437

When you use an @Inject-annotated constructor to inform Dagger how to provide a dependency, can you later override it in a Module? Case: my production code uses a component with the annotated constructor, and I want to override it with a test implementation during testing. Would my override = true Module successfully override the production implementation during testing?

Or a more general questions, what takes precedence, Modules or annotated classes?

1 Answers
Related