@Test public void testGenerateColumnWhenColumnIsNotNew() throws Exception { final ActionWorkItemCol52 column = mock(ActionWorkItemCol52.class); doReturn(false).when(plugin).isNewColumn(); doReturn(column).when(plugin).getOriginalColumnConfig52(); plugin.generateColumn(); verify(presenter).updateColumn(column, editingCol); }
@Override public Boolean generateColumn() { if (isNewColumn()) { presenter.appendColumn(editingCol()); } else { try { presenter.updateColumn(originalCol(), editingCol()); } catch (ModelSynchronizer.VetoException veto) { wizard.showGenericVetoError(); return false; } } return true; }
ActionWorkItemPlugin extends BaseDecisionTableColumnPlugin implements HasWorkItemPage,
                                                                                   HasAdditionalInfoPage { @Override public Boolean generateColumn() { if (isNewColumn()) { presenter.appendColumn(editingCol()); } else { try { presenter.updateColumn(originalCol(), editingCol()); } catch (ModelSynchronizer.VetoException veto) { wizard.showGenericVetoError(); return false; } } return true; } }
ActionWorkItemPlugin extends BaseDecisionTableColumnPlugin implements HasWorkItemPage,
                                                                                   HasAdditionalInfoPage { @Override public Boolean generateColumn() { if (isNewColumn()) { presenter.appendColumn(editingCol()); } else { try { presenter.updateColumn(originalCol(), editingCol()); } catch (ModelSynchronizer.VetoException veto) { wizard.showGenericVetoError(); return false; } } return true; } @Inject  ActionWorkItemPlugin(final AdditionalInfoPage<ActionWorkItemPlugin> additionalInfoPage,
                                final WorkItemPage workItemPage,
                                final Event<WizardPageStatusChangeEvent> changeEvent,
                                final TranslationService translationService); }
ActionWorkItemPlugin extends BaseDecisionTableColumnPlugin implements HasWorkItemPage,
                                                                                   HasAdditionalInfoPage { @Override public Boolean generateColumn() { if (isNewColumn()) { presenter.appendColumn(editingCol()); } else { try { presenter.updateColumn(originalCol(), editingCol()); } catch (ModelSynchronizer.VetoException veto) { wizard.showGenericVetoError(); return false; } } return true; } @Inject  ActionWorkItemPlugin(final AdditionalInfoPage<ActionWorkItemPlugin> additionalInfoPage,
                                final WorkItemPage workItemPage,
                                final Event<WizardPageStatusChangeEvent> changeEvent,
                                final TranslationService translationService); @Override String getTitle(); @Override List<WizardPage> getPages(); @Override void init(final NewGuidedDecisionTableColumnWizard wizard); @Override String getWorkItem(); @Override void setWorkItem(final String workItem); @Override ActionWorkItemCol52 editingCol(); @Override String getHeader(); @Override void setHeader(final String header); @Override Set<String> getAlreadyUsedColumnHeaders(); @Override Boolean isWorkItemSet(); @Override PortableWorkDefinition getWorkItemDefinition(); @Override void forEachWorkItem(final BiConsumer<String, String> biConsumer); @Override void setWorkItemPageAsCompleted(); @Override boolean isHideColumn(); @Override void setHideColumn(boolean hideColumn); @Override void setInsertLogical(final Boolean value); @Override void setUpdate(final Boolean value); @Override boolean showUpdateEngineWithChanges(); @Override boolean showLogicallyInsert(); @Override boolean isLogicallyInsert(); @Override boolean isUpdateEngine(); @Override Boolean generateColumn(); @Override Type getType(); }
ActionWorkItemPlugin extends BaseDecisionTableColumnPlugin implements HasWorkItemPage,
                                                                                   HasAdditionalInfoPage { @Override public Boolean generateColumn() { if (isNewColumn()) { presenter.appendColumn(editingCol()); } else { try { presenter.updateColumn(originalCol(), editingCol()); } catch (ModelSynchronizer.VetoException veto) { wizard.showGenericVetoError(); return false; } } return true; } @Inject  ActionWorkItemPlugin(final AdditionalInfoPage<ActionWorkItemPlugin> additionalInfoPage,
                                final WorkItemPage workItemPage,
                                final Event<WizardPageStatusChangeEvent> changeEvent,
                                final TranslationService translationService); @Override String getTitle(); @Override List<WizardPage> getPages(); @Override void init(final NewGuidedDecisionTableColumnWizard wizard); @Override String getWorkItem(); @Override void setWorkItem(final String workItem); @Override ActionWorkItemCol52 editingCol(); @Override String getHeader(); @Override void setHeader(final String header); @Override Set<String> getAlreadyUsedColumnHeaders(); @Override Boolean isWorkItemSet(); @Override PortableWorkDefinition getWorkItemDefinition(); @Override void forEachWorkItem(final BiConsumer<String, String> biConsumer); @Override void setWorkItemPageAsCompleted(); @Override boolean isHideColumn(); @Override void setHideColumn(boolean hideColumn); @Override void setInsertLogical(final Boolean value); @Override void setUpdate(final Boolean value); @Override boolean showUpdateEngineWithChanges(); @Override boolean showLogicallyInsert(); @Override boolean isLogicallyInsert(); @Override boolean isUpdateEngine(); @Override Boolean generateColumn(); @Override Type getType();  }