@Test public void testOnSelect() { presenter.setup(providerType, providerTypes); providerTypes.forEach(currentProviderType -> { presenter.onSelect(new ProviderTypeSelectedEvent(currentProviderType.getKey())); if (!currentProviderType.equals(providerType)) { verify(view, times(1)).select(currentProviderType.getKey()); } }); verify(view, times(2)).select(providerType.getKey()); }
protected void onSelect(@Observes final ProviderTypeSelectedEvent event) { if (event.getProviderTypeKey() != null && providerTypes.containsKey(event.getProviderTypeKey())) { view.select(event.getProviderTypeKey()); } }
ProviderTypeNavigationPresenter { protected void onSelect(@Observes final ProviderTypeSelectedEvent event) { if (event.getProviderTypeKey() != null && providerTypes.containsKey(event.getProviderTypeKey())) { view.select(event.getProviderTypeKey()); } } }
ProviderTypeNavigationPresenter { protected void onSelect(@Observes final ProviderTypeSelectedEvent event) { if (event.getProviderTypeKey() != null && providerTypes.containsKey(event.getProviderTypeKey())) { view.select(event.getProviderTypeKey()); } } @Inject  ProviderTypeNavigationPresenter(final View view,
                                           final Event<AddNewProviderTypeEvent> addNewProviderTypeEvent,
                                           final Event<ProviderTypeListRefreshEvent> providerTypeListRefreshEvent,
                                           final Event<ProviderTypeSelectedEvent> providerTypeSelectedEvent); }
ProviderTypeNavigationPresenter { protected void onSelect(@Observes final ProviderTypeSelectedEvent event) { if (event.getProviderTypeKey() != null && providerTypes.containsKey(event.getProviderTypeKey())) { view.select(event.getProviderTypeKey()); } } @Inject  ProviderTypeNavigationPresenter(final View view,
                                           final Event<AddNewProviderTypeEvent> addNewProviderTypeEvent,
                                           final Event<ProviderTypeListRefreshEvent> providerTypeListRefreshEvent,
                                           final Event<ProviderTypeSelectedEvent> providerTypeSelectedEvent); @PostConstruct void init(); void setup(final ProviderType firstProvider,
                      final Collection<ProviderType> providerTypes); View getView(); void clear(); void onRefresh(); void onAddProviderType(); }
ProviderTypeNavigationPresenter { protected void onSelect(@Observes final ProviderTypeSelectedEvent event) { if (event.getProviderTypeKey() != null && providerTypes.containsKey(event.getProviderTypeKey())) { view.select(event.getProviderTypeKey()); } } @Inject  ProviderTypeNavigationPresenter(final View view,
                                           final Event<AddNewProviderTypeEvent> addNewProviderTypeEvent,
                                           final Event<ProviderTypeListRefreshEvent> providerTypeListRefreshEvent,
                                           final Event<ProviderTypeSelectedEvent> providerTypeSelectedEvent); @PostConstruct void init(); void setup(final ProviderType firstProvider,
                      final Collection<ProviderType> providerTypes); View getView(); void clear(); void onRefresh(); void onAddProviderType();  }