I use Dagger in an Android application to provide graphs of application areas and activity. And I use Robolectric for unit testing. I know that I can provide Robolectric a replacement Application class that is configured with an application object graph that overrides the real one with mocks. But I don’t understand how to do the same with activity object graphs, since the standard template for activity object graphs is intended for the actions themselves to create an instance of the Dagger tool module they need. Any suggestions would be greatly appreciated.
source
share