@Test public void onCreation_ListOfArticlesIsLoaded() throws IOException { final MainPresenter presenter = spy(new MainPresenter(mViewActions, Schedulers.trampoline(), Schedulers.trampoline(), getMockedRequestCommandBuilder())); presenter.attachView(mViewActions); verify(mViewActions).displayPopularArticlesList(anyListOf(ListItem.class)); }
@Override public void attachView(final MainContract.ViewActions viewActions) { mViewActions = viewActions; mIsViewAttached = true; if (!mIsDataShown) { mViewActions.showLoadingAnimation(); loadPopularArticles(); } }
MainPresenter implements MainContract.UserActions { @Override public void attachView(final MainContract.ViewActions viewActions) { mViewActions = viewActions; mIsViewAttached = true; if (!mIsDataShown) { mViewActions.showLoadingAnimation(); loadPopularArticles(); } } }
MainPresenter implements MainContract.UserActions { @Override public void attachView(final MainContract.ViewActions viewActions) { mViewActions = viewActions; mIsViewAttached = true; if (!mIsDataShown) { mViewActions.showLoadingAnimation(); loadPopularArticles(); } } MainPresenter(@NonNull final MainContract.ViewActions viewActions,
                         @Named("io") final Scheduler ioScheduler,
                         @Named("ui") final Scheduler uiScheduler,
                         final RequestArticlesCommand.RequestArticlesCommandBuilder requestArticlesCommandBuilder); }
MainPresenter implements MainContract.UserActions { @Override public void attachView(final MainContract.ViewActions viewActions) { mViewActions = viewActions; mIsViewAttached = true; if (!mIsDataShown) { mViewActions.showLoadingAnimation(); loadPopularArticles(); } } MainPresenter(@NonNull final MainContract.ViewActions viewActions,
                         @Named("io") final Scheduler ioScheduler,
                         @Named("ui") final Scheduler uiScheduler,
                         final RequestArticlesCommand.RequestArticlesCommandBuilder requestArticlesCommandBuilder); @Override void attachView(final MainContract.ViewActions viewActions); @Override void deAttachView(); @Override void onViewDestroyed(final boolean andRecreating); }
MainPresenter implements MainContract.UserActions { @Override public void attachView(final MainContract.ViewActions viewActions) { mViewActions = viewActions; mIsViewAttached = true; if (!mIsDataShown) { mViewActions.showLoadingAnimation(); loadPopularArticles(); } } MainPresenter(@NonNull final MainContract.ViewActions viewActions,
                         @Named("io") final Scheduler ioScheduler,
                         @Named("ui") final Scheduler uiScheduler,
                         final RequestArticlesCommand.RequestArticlesCommandBuilder requestArticlesCommandBuilder); @Override void attachView(final MainContract.ViewActions viewActions); @Override void deAttachView(); @Override void onViewDestroyed(final boolean andRecreating);  }