Search in sources :

Example 1 with NetworkManager

use of com.jakdor.labday.common.repository.NetworkManager in project LabDayApp by jakdor.

the class ProjectRepositoryIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    // todo replace with mock, this is a real app context!
    targetContext = InstrumentationRegistry.getTargetContext();
    testContext = InstrumentationRegistry.getContext();
    SoLoader.init(targetContext, false);
    localDbHandler = new LocalDbHandler(Instrumentation.newApplication(TestApp.class, targetContext));
    projectRepository = new ProjectRepository(new NetworkManager(new RetrofitBuilder()), localDbHandler, new RxSchedulersFacade());
}
Also used : LocalDbHandler(com.jakdor.labday.common.localdb.LocalDbHandler) ProjectRepository(com.jakdor.labday.common.repository.ProjectRepository) RxSchedulersFacade(com.jakdor.labday.rx.RxSchedulersFacade) NetworkManager(com.jakdor.labday.common.repository.NetworkManager) RetrofitBuilder(com.jakdor.labday.common.network.RetrofitBuilder) Before(org.junit.Before)

Example 2 with NetworkManager

use of com.jakdor.labday.common.repository.NetworkManager in project LabDayApp by jakdor.

the class NetworkManagerIntegrationTest method setUp.

/**
 * Setup local Mock REST API server for instrumentation tests
 */
@Before
public void setUp() throws Exception {
    testContext = InstrumentationRegistry.getContext();
    networkManager = new NetworkManager(new RetrofitBuilder());
}
Also used : NetworkManager(com.jakdor.labday.common.repository.NetworkManager) RetrofitBuilder(com.jakdor.labday.common.network.RetrofitBuilder) Before(org.junit.Before)

Aggregations

RetrofitBuilder (com.jakdor.labday.common.network.RetrofitBuilder)2 NetworkManager (com.jakdor.labday.common.repository.NetworkManager)2 Before (org.junit.Before)2 LocalDbHandler (com.jakdor.labday.common.localdb.LocalDbHandler)1 ProjectRepository (com.jakdor.labday.common.repository.ProjectRepository)1 RxSchedulersFacade (com.jakdor.labday.rx.RxSchedulersFacade)1