@Test public void testOnDeleteContainer() { List<ContainerConfig> currentElements = mockList(ContainerConfig.class, CONTAINER_CONFIG_COUNT); when(dataProvider.getList()).thenReturn(currentElements); int originalSize = currentElements.size(); int index = 4; ContainerConfig arbitraryElement = currentElements.get(index); presenter.onDeleteContainer(arbitraryElement); assertEquals(originalSize - 1, currentElements.size()); assertFalse(currentElements.contains(arbitraryElement)); verify(configParamsChangeEvent, times(1)).fire(new ContainerConfigParamsChangeEvent(currentElements)); verify(contentChangeHandler, times(1)).onContentChange(); }
protected void onDeleteContainer(ContainerConfig containerConfig) { dataProvider.getList().remove(containerConfig); onContentChange(); }
ContainerConfigParamsPresenter extends AbstractHasContentChangeHandlers implements PipelineParamsForm { protected void onDeleteContainer(ContainerConfig containerConfig) { dataProvider.getList().remove(containerConfig); onContentChange(); } }
ContainerConfigParamsPresenter extends AbstractHasContentChangeHandlers implements PipelineParamsForm { protected void onDeleteContainer(ContainerConfig containerConfig) { dataProvider.getList().remove(containerConfig); onContentChange(); } @Inject  ContainerConfigParamsPresenter(final View view,
                                          final ContainerConfigPopup containerConfigPopup,
                                          final Event<ContainerConfigParamsChangeEvent> configParamsChangeEvent,
                                          final TranslationService translationService); }
ContainerConfigParamsPresenter extends AbstractHasContentChangeHandlers implements PipelineParamsForm { protected void onDeleteContainer(ContainerConfig containerConfig) { dataProvider.getList().remove(containerConfig); onContentChange(); } @Inject  ContainerConfigParamsPresenter(final View view,
                                          final ContainerConfigPopup containerConfigPopup,
                                          final Event<ContainerConfigParamsChangeEvent> configParamsChangeEvent,
                                          final TranslationService translationService); @PostConstruct void init(); @Override IsElement getView(); @Override Map<String, String> buildParams(); @Override void initialise(); @Override void prepareView(); @Override void clear(); @Override void isComplete(final Callback<Boolean> callback); @Override String getWizardTitle(); }
ContainerConfigParamsPresenter extends AbstractHasContentChangeHandlers implements PipelineParamsForm { protected void onDeleteContainer(ContainerConfig containerConfig) { dataProvider.getList().remove(containerConfig); onContentChange(); } @Inject  ContainerConfigParamsPresenter(final View view,
                                          final ContainerConfigPopup containerConfigPopup,
                                          final Event<ContainerConfigParamsChangeEvent> configParamsChangeEvent,
                                          final TranslationService translationService); @PostConstruct void init(); @Override IsElement getView(); @Override Map<String, String> buildParams(); @Override void initialise(); @Override void prepareView(); @Override void clear(); @Override void isComplete(final Callback<Boolean> callback); @Override String getWizardTitle();  }