use of uk.ivanc.archimvp.view.MainMvpView in project archi by ivacf.
the class MainPresenterTest method setUp.
@Before
public void setUp() {
ArchiApplication application = (ArchiApplication) RuntimeEnvironment.application;
githubService = mock(GithubService.class);
// Mock the retrofit service so we don't call the API directly
application.setGithubService(githubService);
// Change the default subscribe schedulers so all observables
// will now run on the same thread
application.setDefaultSubscribeScheduler(Schedulers.immediate());
mainPresenter = new MainPresenter();
mainMvpView = mock(MainMvpView.class);
when(mainMvpView.getContext()).thenReturn(application);
mainPresenter.attachView(mainMvpView);
}
Aggregations