use of uk.ivanc.archimvp.view.RepositoryMvpView in project archi by ivacf.
the class RepositoryPresenterTest 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());
repositoryPresenter = new RepositoryPresenter();
repositoryMvpView = mock(RepositoryMvpView.class);
when(repositoryMvpView.getContext()).thenReturn(application);
repositoryPresenter.attachView(repositoryMvpView);
}
Aggregations