You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tasks/app/src/androidTest/java/org/tasks/injection/InjectingTestCase.java

24 lines
597 B
Java

package org.tasks.injection;
import org.junit.Before;
import static android.support.test.InstrumentationRegistry.getTargetContext;
import static org.tasks.TestUtilities.initializeMockito;
public abstract class InjectingTestCase {
protected TestComponent component;
@Before
public void setUp() {
initializeMockito(getTargetContext());
component = DaggerTestComponent.builder()
.testModule(new TestModule(getTargetContext()))
.build();
inject(component);
}
protected abstract void inject(TestComponent component);
}