@Test public void showTwiceWithSameInfoDebounces() { presenter.takeView(view); Parcelable info = mock(Parcelable.class); presenter.show(info); presenter.show(info); verify(view).show(same(info), anyBoolean(), same(presenter)); }
public void show(D info) { if (whatToShow == info || whatToShow != null && whatToShow.equals(info)) { return; } whatToShow = info; if (!hasView()) return; getView().show(whatToShow, WITH_FLOURISH, this); }
PopupPresenter extends Presenter<Popup<D, R>> { public void show(D info) { if (whatToShow == info || whatToShow != null && whatToShow.equals(info)) { return; } whatToShow = info; if (!hasView()) return; getView().show(whatToShow, WITH_FLOURISH, this); } }
PopupPresenter extends Presenter<Popup<D, R>> { public void show(D info) { if (whatToShow == info || whatToShow != null && whatToShow.equals(info)) { return; } whatToShow = info; if (!hasView()) return; getView().show(whatToShow, WITH_FLOURISH, this); } protected  PopupPresenter(String customStateKey); protected  PopupPresenter(); }
PopupPresenter extends Presenter<Popup<D, R>> { public void show(D info) { if (whatToShow == info || whatToShow != null && whatToShow.equals(info)) { return; } whatToShow = info; if (!hasView()) return; getView().show(whatToShow, WITH_FLOURISH, this); } protected  PopupPresenter(String customStateKey); protected  PopupPresenter(); D showing(); void show(D info); void dismiss(); final void onDismissed(R result); @Override void dropView(Popup<D, R> view); @Override void onLoad(Bundle savedInstanceState); @Override void onSave(Bundle outState); @Override void onExitScope(); }
PopupPresenter extends Presenter<Popup<D, R>> { public void show(D info) { if (whatToShow == info || whatToShow != null && whatToShow.equals(info)) { return; } whatToShow = info; if (!hasView()) return; getView().show(whatToShow, WITH_FLOURISH, this); } protected  PopupPresenter(String customStateKey); protected  PopupPresenter(); D showing(); void show(D info); void dismiss(); final void onDismissed(R result); @Override void dropView(Popup<D, R> view); @Override void onLoad(Bundle savedInstanceState); @Override void onSave(Bundle outState); @Override void onExitScope();  }