@Test public void testLoadNoMore() throws Exception { List<News> newses = mock(ArrayList.class); when(newses.size()).thenReturn(10); Integer offset = DataManager.PAGE_LIMIT; when(mNewsView.getItemOffset()).thenReturn(offset); when(mDataManager.getAllNewses(offset)).thenReturn(Single.just(newses)); mPresenter.loadMore(); verify(mNewsView).showNewes(newses, false); verify(mNewsView).showLoadNoMore(); }
public void loadMore() { loadTopics(false); }
NewsPresenter extends BasePresenter<INewsView> { public void loadMore() { loadTopics(false); } }
NewsPresenter extends BasePresenter<INewsView> { public void loadMore() { loadTopics(false); } @Inject  NewsPresenter(DataManager dataManager); }
NewsPresenter extends BasePresenter<INewsView> { public void loadMore() { loadTopics(false); } @Inject  NewsPresenter(DataManager dataManager); @Override void onAttach(INewsView view); void onRefresh(); void loadMore(); @Override void onDetach(); }
NewsPresenter extends BasePresenter<INewsView> { public void loadMore() { loadTopics(false); } @Inject  NewsPresenter(DataManager dataManager); @Override void onAttach(INewsView view); void onRefresh(); void loadMore(); @Override void onDetach();  }