@Test public void testFindWorkItemDefinition() { final PortableWorkDefinition workItem1 = getMock("workItem1"); final PortableWorkDefinition workItem2 = getMock("workItem2"); final HashSet<PortableWorkDefinition> fakeDefinitions = new HashSet<PortableWorkDefinition>() {{ add(workItem1); add(workItem2); }}; when(presenter.getWorkItemDefinitions()).thenReturn(fakeDefinitions); final PortableWorkDefinition workItem = plugin.findWorkItemDefinition("workItem1"); assertEquals(workItem1, workItem); }
PortableWorkDefinition findWorkItemDefinition(final String workItem) { final List<PortableWorkDefinition> workItemDefinitions = new ArrayList<>(presenter.getWorkItemDefinitions()); return workItemDefinitions .stream() .filter(a -> a.getName().equals(workItem)) .findFirst() .orElseThrow(IllegalStateException::new); }
ActionWorkItemPlugin extends BaseDecisionTableColumnPlugin implements HasWorkItemPage,
                                                                                   HasAdditionalInfoPage { PortableWorkDefinition findWorkItemDefinition(final String workItem) { final List<PortableWorkDefinition> workItemDefinitions = new ArrayList<>(presenter.getWorkItemDefinitions()); return workItemDefinitions .stream() .filter(a -> a.getName().equals(workItem)) .findFirst() .orElseThrow(IllegalStateException::new); } }
ActionWorkItemPlugin extends BaseDecisionTableColumnPlugin implements HasWorkItemPage,
                                                                                   HasAdditionalInfoPage { PortableWorkDefinition findWorkItemDefinition(final String workItem) { final List<PortableWorkDefinition> workItemDefinitions = new ArrayList<>(presenter.getWorkItemDefinitions()); return workItemDefinitions .stream() .filter(a -> a.getName().equals(workItem)) .findFirst() .orElseThrow(IllegalStateException::new); } @Inject  ActionWorkItemPlugin(final AdditionalInfoPage<ActionWorkItemPlugin> additionalInfoPage,
                                final WorkItemPage workItemPage,
                                final Event<WizardPageStatusChangeEvent> changeEvent,
                                final TranslationService translationService); }
ActionWorkItemPlugin extends BaseDecisionTableColumnPlugin implements HasWorkItemPage,
                                                                                   HasAdditionalInfoPage { PortableWorkDefinition findWorkItemDefinition(final String workItem) { final List<PortableWorkDefinition> workItemDefinitions = new ArrayList<>(presenter.getWorkItemDefinitions()); return workItemDefinitions .stream() .filter(a -> a.getName().equals(workItem)) .findFirst() .orElseThrow(IllegalStateException::new); } @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 { PortableWorkDefinition findWorkItemDefinition(final String workItem) { final List<PortableWorkDefinition> workItemDefinitions = new ArrayList<>(presenter.getWorkItemDefinitions()); return workItemDefinitions .stream() .filter(a -> a.getName().equals(workItem)) .findFirst() .orElseThrow(IllegalStateException::new); } @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();  }