@Test public void onLoadListWouldStartLoadingList() { when(module.loadVocabularyWords()).thenReturn(Call.empty()); presenter.onLoadList(); verify(module).loadVocabularyWords(); }
public void onLoadList() { logger.debug("onLoadList() called"); applyState(IVocabularyListView::showProgress); vocabularyList.clear(); selectedPosition = NO_POSITION; call = vocabularyModule.loadVocabularyWords(); call.enqueue(this::processData, this::processLoadError); }
VocabularyListPresenter extends AbstractPresenter<IVocabularyListView> { public void onLoadList() { logger.debug("onLoadList() called"); applyState(IVocabularyListView::showProgress); vocabularyList.clear(); selectedPosition = NO_POSITION; call = vocabularyModule.loadVocabularyWords(); call.enqueue(this::processData, this::processLoadError); } }
VocabularyListPresenter extends AbstractPresenter<IVocabularyListView> { public void onLoadList() { logger.debug("onLoadList() called"); applyState(IVocabularyListView::showProgress); vocabularyList.clear(); selectedPosition = NO_POSITION; call = vocabularyModule.loadVocabularyWords(); call.enqueue(this::processData, this::processLoadError); } @Inject  VocabularyListPresenter(VocabularyModule vocabularyModule, VocabularyNavigator navigator,
                                   @Named(VIEW_EXECUTOR) Executor executor); }
VocabularyListPresenter extends AbstractPresenter<IVocabularyListView> { public void onLoadList() { logger.debug("onLoadList() called"); applyState(IVocabularyListView::showProgress); vocabularyList.clear(); selectedPosition = NO_POSITION; call = vocabularyModule.loadVocabularyWords(); call.enqueue(this::processData, this::processLoadError); } @Inject  VocabularyListPresenter(VocabularyModule vocabularyModule, VocabularyNavigator navigator,
                                   @Named(VIEW_EXECUTOR) Executor executor); @Override void onCreate(); @Override void onBind(IVocabularyListView view); @Override void onDestroy(); void onWordSelected(int position); void onLoadList(); void onRefreshList(); }
VocabularyListPresenter extends AbstractPresenter<IVocabularyListView> { public void onLoadList() { logger.debug("onLoadList() called"); applyState(IVocabularyListView::showProgress); vocabularyList.clear(); selectedPosition = NO_POSITION; call = vocabularyModule.loadVocabularyWords(); call.enqueue(this::processData, this::processLoadError); } @Inject  VocabularyListPresenter(VocabularyModule vocabularyModule, VocabularyNavigator navigator,
                                   @Named(VIEW_EXECUTOR) Executor executor); @Override void onCreate(); @Override void onBind(IVocabularyListView view); @Override void onDestroy(); void onWordSelected(int position); void onLoadList(); void onRefreshList(); static final int NO_POSITION; }