@Test public void shouldShowErrorIfInternetNotConnectedWhenRetryButtonClicked(){ presenter.setView(view); presenter.onRetryButtonClicked(false); verify(view , times(1)).showNetworkError(); }
void onRetryButtonClicked(boolean internetConnected) { if (!internetConnected){ getView().showNetworkError(); } else { getView().hideNetworkError(); } }
MainPresenter extends BasePresenter<MainPresenter.View> implements SyncConnectionListener { void onRetryButtonClicked(boolean internetConnected) { if (!internetConnected){ getView().showNetworkError(); } else { getView().hideNetworkError(); } } }
MainPresenter extends BasePresenter<MainPresenter.View> implements SyncConnectionListener { void onRetryButtonClicked(boolean internetConnected) { if (!internetConnected){ getView().showNetworkError(); } else { getView().hideNetworkError(); } } @Inject  MainPresenter(); }
MainPresenter extends BasePresenter<MainPresenter.View> implements SyncConnectionListener { void onRetryButtonClicked(boolean internetConnected) { if (!internetConnected){ getView().showNetworkError(); } else { getView().hideNetworkError(); } } @Inject  MainPresenter(); @Override void initialize(); @Override void onDestroy(); @Override void onNetworkConnectionChanged(boolean internetConnected); void onFABScrollUpClicked(); void onTabSelected(int position); }
MainPresenter extends BasePresenter<MainPresenter.View> implements SyncConnectionListener { void onRetryButtonClicked(boolean internetConnected) { if (!internetConnected){ getView().showNetworkError(); } else { getView().hideNetworkError(); } } @Inject  MainPresenter(); @Override void initialize(); @Override void onDestroy(); @Override void onNetworkConnectionChanged(boolean internetConnected); void onFABScrollUpClicked(); void onTabSelected(int position);  }