@Test public void onRemoveProviderTypeTest() { presenter.setup(providerType, providers, provider); presenter.onRemoveProviderType(); verify(view, times(1)).confirmRemove(any(Command.class)); presenter.removeProviderType(); verify(providerTypeService, times(1)).disableProviderType(providerType); verify(providerTypeListRefreshEvent, times(1)).fire(new ProviderTypeListRefreshEvent()); }
public void onRemoveProviderType() { view.confirmRemove(this::removeProviderType); }
ProviderTypePresenter { public void onRemoveProviderType() { view.confirmRemove(this::removeProviderType); } }
ProviderTypePresenter { public void onRemoveProviderType() { view.confirmRemove(this::removeProviderType); } @Inject  ProviderTypePresenter(final View view,
                                 final Caller<ProviderTypeService> providerTypeService,
                                 final Event<AddNewProviderEvent> addNewProviderEvent,
                                 final Event<ProviderTypeListRefreshEvent> providerTypeListRefreshEvent,
                                 final Event<ProviderSelectedEvent> providerSelectedEvent); }
ProviderTypePresenter { public void onRemoveProviderType() { view.confirmRemove(this::removeProviderType); } @Inject  ProviderTypePresenter(final View view,
                                 final Caller<ProviderTypeService> providerTypeService,
                                 final Event<AddNewProviderEvent> addNewProviderEvent,
                                 final Event<ProviderTypeListRefreshEvent> providerTypeListRefreshEvent,
                                 final Event<ProviderSelectedEvent> providerSelectedEvent); @PostConstruct void init(); View getView(); void setup(final ProviderType providerType,
                      final Collection<ProviderKey> providers,
                      final ProviderKey firstProviderKey); void onProviderSelect(@Observes final ProviderSelectedEvent event); void onAddNewProvider(); void onRemoveProviderType(); }
ProviderTypePresenter { public void onRemoveProviderType() { view.confirmRemove(this::removeProviderType); } @Inject  ProviderTypePresenter(final View view,
                                 final Caller<ProviderTypeService> providerTypeService,
                                 final Event<AddNewProviderEvent> addNewProviderEvent,
                                 final Event<ProviderTypeListRefreshEvent> providerTypeListRefreshEvent,
                                 final Event<ProviderSelectedEvent> providerSelectedEvent); @PostConstruct void init(); View getView(); void setup(final ProviderType providerType,
                      final Collection<ProviderKey> providers,
                      final ProviderKey firstProviderKey); void onProviderSelect(@Observes final ProviderSelectedEvent event); void onAddNewProvider(); void onRemoveProviderType();  }