I’ve couple of questions when trying to use hilt for testing in a multi-module project
1. Say I’ve a feature module which declared some interface and has its classes using that interface. The impl of this interface is provided in the app module below in the hierarchy. How can I write tests for feature module in the feature module itself? As feature module doesn’t have binding for that interface, it throws missing binding error. Sure I can provide fake/mock dependencies for them, but what if say I’ve 50 such interfaces whose bindings exist below that feature module? Providing fakes doesn’t look scalable here
2. How to replace only a single dependency in other module?
3. If we need to use
@UninstallModules
for #2, how will you do so when the original dagger module is
internal
?