@Test public void shouldSelectCinemaPositionWhenCinemaTabSelected(){ presenter.setView(view); presenter.onTabSelected(CINEMAS_TAB_POSITION); verify(view).onCinemaTabSelected(); }
public void onTabSelected(int position) { switch (position) { case CINEMAS_TAB_POSITION : { getView().onCinemaTabSelected(); currentTabPosition = CINEMAS_TAB_POSITION; break; } case ACTORS_TAB_POSITION : { getView().onActorTabSelected(); currentTabPosition = ACTORS_TAB_POSITION; break; } } }
SearchPresenter extends BasePresenter<SearchPresenter.View> { public void onTabSelected(int position) { switch (position) { case CINEMAS_TAB_POSITION : { getView().onCinemaTabSelected(); currentTabPosition = CINEMAS_TAB_POSITION; break; } case ACTORS_TAB_POSITION : { getView().onActorTabSelected(); currentTabPosition = ACTORS_TAB_POSITION; break; } } } }
SearchPresenter extends BasePresenter<SearchPresenter.View> { public void onTabSelected(int position) { switch (position) { case CINEMAS_TAB_POSITION : { getView().onCinemaTabSelected(); currentTabPosition = CINEMAS_TAB_POSITION; break; } case ACTORS_TAB_POSITION : { getView().onActorTabSelected(); currentTabPosition = ACTORS_TAB_POSITION; break; } } } @Inject  SearchPresenter(); }
SearchPresenter extends BasePresenter<SearchPresenter.View> { public void onTabSelected(int position) { switch (position) { case CINEMAS_TAB_POSITION : { getView().onCinemaTabSelected(); currentTabPosition = CINEMAS_TAB_POSITION; break; } case ACTORS_TAB_POSITION : { getView().onActorTabSelected(); currentTabPosition = ACTORS_TAB_POSITION; break; } } } @Inject  SearchPresenter(); @Override void initialize(); @Override void onDestroy(); void onTabSelected(int position); void onTextChanged(String query); void onClearEditTextClicked(); }
SearchPresenter extends BasePresenter<SearchPresenter.View> { public void onTabSelected(int position) { switch (position) { case CINEMAS_TAB_POSITION : { getView().onCinemaTabSelected(); currentTabPosition = CINEMAS_TAB_POSITION; break; } case ACTORS_TAB_POSITION : { getView().onActorTabSelected(); currentTabPosition = ACTORS_TAB_POSITION; break; } } } @Inject  SearchPresenter(); @Override void initialize(); @Override void onDestroy(); void onTabSelected(int position); void onTextChanged(String query); void onClearEditTextClicked();  }