Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private static class HomeActivityTestRule extends IntentsTestRule {
private HomeActivityTestRule() {
super(HomeActivity.class);
}
@Override public void beforeActivityLaunched() {
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
ShowAndHideApplication app =
(ShowAndHideApplication) instrumentation.getTargetContext().getApplicationContext();
ShowAndHideTestComponent component = DaggerShowAndHideTestComponent.builder()
.mockFileUtilitiesModule(new MockFileUtilitiesModule())
.mockImageProcessorModule(new MockImageProcessorModule())
.build();
app.setComponent(component);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.