mirror of https://github.com/tasks/tasks
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.
24 lines
597 B
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);
|
|
}
|