target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testSetValueNull() { presenter.setValue(null); verifyClear(); assertNull(presenter.getValue()); verify(paramInstance, never()).get(); } | @Override public void setValue(Condition value) { super.setValue(value); clear(); if (value != null) { if (value.getParams().size() >= 1) { String type = variableSearchService.getOptionType(value.getParams().get(0)); if (type != null) { functionSearchService.reload(type, () -> onSetValue(value)); } else { view.setVaria... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { @Override public void setValue(Condition value) { super.setValue(value); clear(); if (value != null) { if (value.getParams().size() >= 1) { String type = variableSearchService.getOptionType(value.getParams().get(0)); if (type != null) { functionSe... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { @Override public void setValue(Condition value) { super.setValue(value); clear(); if (value != null) { if (value.getParams().size() >= 1) { String type = variableSearchService.getOptionType(value.getParams().get(0)); if (type != null) { functionSe... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { @Override public void setValue(Condition value) { super.setValue(value); clear(); if (value != null) { if (value.getParams().size() >= 1) { String type = variableSearchService.getOptionType(value.getParams().get(0)); if (type != null) { functionSe... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { @Override public void setValue(Condition value) { super.setValue(value); clear(); if (value != null) { if (value.getParams().size() >= 1) { String type = variableSearchService.getOptionType(value.getParams().get(0)); if (type != null) { functionSe... |
@Test public void testSetValueWhenConditionMalFormed() { Condition condition = new Condition(); when(translationService.getValue(CONDITION_MAL_FORMED)).thenReturn(TRANSLATED_MESSAGE); presenter.setValue(condition); verify(view).setConditionError(TRANSLATED_MESSAGE); verifyClear(); assertEquals(condition, presenter.getV... | @Override public void setValue(Condition value) { super.setValue(value); clear(); if (value != null) { if (value.getParams().size() >= 1) { String type = variableSearchService.getOptionType(value.getParams().get(0)); if (type != null) { functionSearchService.reload(type, () -> onSetValue(value)); } else { view.setVaria... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { @Override public void setValue(Condition value) { super.setValue(value); clear(); if (value != null) { if (value.getParams().size() >= 1) { String type = variableSearchService.getOptionType(value.getParams().get(0)); if (type != null) { functionSe... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { @Override public void setValue(Condition value) { super.setValue(value); clear(); if (value != null) { if (value.getParams().size() >= 1) { String type = variableSearchService.getOptionType(value.getParams().get(0)); if (type != null) { functionSe... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { @Override public void setValue(Condition value) { super.setValue(value); clear(); if (value != null) { if (value.getParams().size() >= 1) { String type = variableSearchService.getOptionType(value.getParams().get(0)); if (type != null) { functionSe... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { @Override public void setValue(Condition value) { super.setValue(value); clear(); if (value != null) { if (value.getParams().size() >= 1) { String type = variableSearchService.getOptionType(value.getParams().get(0)); if (type != null) { functionSe... |
@Test public void testClear() { presenter.clear(); verifyClear(); } | public void clear() { variableSearchSelectionHandler.clearSelection(); functionSearchSelectionHandler.clearSelection(); functionSearchService.clear(); removeParams(); clearErrors(); } | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public void clear() { variableSearchSelectionHandler.clearSelection(); functionSearchSelectionHandler.clearSelection(); functionSearchService.clear(); removeParams(); clearErrors(); } } | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public void clear() { variableSearchSelectionHandler.clearSelection(); functionSearchSelectionHandler.clearSelection(); functionSearchService.clear(); removeParams(); clearErrors(); } @Inject SimpleConditionEditorPresenter(final View view,
... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public void clear() { variableSearchSelectionHandler.clearSelection(); functionSearchSelectionHandler.clearSelection(); functionSearchService.clear(); removeParams(); clearErrors(); } @Inject SimpleConditionEditorPresenter(final View view,
... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public void clear() { variableSearchSelectionHandler.clearSelection(); functionSearchSelectionHandler.clearSelection(); functionSearchService.clear(); removeParams(); clearErrors(); } @Inject SimpleConditionEditorPresenter(final View view,
... |
@Test public void testOnParamChangeWhenParamsAreValid() { prepareForParamChangeTest(true); paramCommandCaptor.getValue().execute(); verifyConditionWasCreated(); assertTrue(presenter.isValid()); } | public boolean isValid() { return valid; } | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public boolean isValid() { return valid; } } | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public boolean isValid() { return valid; } @Inject SimpleConditionEditorPresenter(final View view,
final ManagedInstance<ConditionParamPresenter> paramInstance,
f... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public boolean isValid() { return valid; } @Inject SimpleConditionEditorPresenter(final View view,
final ManagedInstance<ConditionParamPresenter> paramInstance,
f... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public boolean isValid() { return valid; } @Inject SimpleConditionEditorPresenter(final View view,
final ManagedInstance<ConditionParamPresenter> paramInstance,
f... |
@Test public void testOnParamChangeWhenParamsAreNotValid() { prepareForParamChangeTest(false); paramCommandCaptor.getValue().execute(); verifyConditionWasCreated(); assertFalse(presenter.isValid()); } | public boolean isValid() { return valid; } | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public boolean isValid() { return valid; } } | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public boolean isValid() { return valid; } @Inject SimpleConditionEditorPresenter(final View view,
final ManagedInstance<ConditionParamPresenter> paramInstance,
f... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public boolean isValid() { return valid; } @Inject SimpleConditionEditorPresenter(final View view,
final ManagedInstance<ConditionParamPresenter> paramInstance,
f... | SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public boolean isValid() { return valid; } @Inject SimpleConditionEditorPresenter(final View view,
final ManagedInstance<ConditionParamPresenter> paramInstance,
f... |
@Test public void getDefinitionType() { assertEquals(tested.getDefinitionType(), BPMNDiagramImpl.class); } | @Override public Class<?> getDefinitionType() { return BPMNDiagramImpl.class; } | BPMNDiagramFilterProvider implements StunnerFormElementFilterProvider { @Override public Class<?> getDefinitionType() { return BPMNDiagramImpl.class; } } | BPMNDiagramFilterProvider implements StunnerFormElementFilterProvider { @Override public Class<?> getDefinitionType() { return BPMNDiagramImpl.class; } BPMNDiagramFilterProvider(); @Inject BPMNDiagramFilterProvider(final SessionManager sessionManager,
final DiagramTypeClientService... | BPMNDiagramFilterProvider implements StunnerFormElementFilterProvider { @Override public Class<?> getDefinitionType() { return BPMNDiagramImpl.class; } BPMNDiagramFilterProvider(); @Inject BPMNDiagramFilterProvider(final SessionManager sessionManager,
final DiagramTypeClientService... | BPMNDiagramFilterProvider implements StunnerFormElementFilterProvider { @Override public Class<?> getDefinitionType() { return BPMNDiagramImpl.class; } BPMNDiagramFilterProvider(); @Inject BPMNDiagramFilterProvider(final SessionManager sessionManager,
final DiagramTypeClientService... |
@Test public void onFormFieldChanged() { tested.onFormFieldChanged(formFieldChanged); final ArgumentCaptor<RefreshFormPropertiesEvent> refreshFormPropertiesArgumentCaptor = ArgumentCaptor.forClass(RefreshFormPropertiesEvent.class); verify(refreshFormPropertiesEvent).fire(refreshFormPropertiesArgumentCaptor.capture()); ... | void onFormFieldChanged(@Observes FormFieldChanged formFieldChanged) { final String adHocFieldName = BPMNDiagramImpl.DIAGRAM_SET + "." + DiagramSet.ADHOC; if (!Objects.equals(formFieldChanged.getName(), adHocFieldName)) { return; } refreshFormPropertiesEvent.fire(new RefreshFormPropertiesEvent(sessionManager.getCurrent... | BPMNDiagramFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes FormFieldChanged formFieldChanged) { final String adHocFieldName = BPMNDiagramImpl.DIAGRAM_SET + "." + DiagramSet.ADHOC; if (!Objects.equals(formFieldChanged.getName(), adHocFieldName)) { return; } refreshFormPrope... | BPMNDiagramFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes FormFieldChanged formFieldChanged) { final String adHocFieldName = BPMNDiagramImpl.DIAGRAM_SET + "." + DiagramSet.ADHOC; if (!Objects.equals(formFieldChanged.getName(), adHocFieldName)) { return; } refreshFormPrope... | BPMNDiagramFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes FormFieldChanged formFieldChanged) { final String adHocFieldName = BPMNDiagramImpl.DIAGRAM_SET + "." + DiagramSet.ADHOC; if (!Objects.equals(formFieldChanged.getName(), adHocFieldName)) { return; } refreshFormPrope... | BPMNDiagramFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes FormFieldChanged formFieldChanged) { final String adHocFieldName = BPMNDiagramImpl.DIAGRAM_SET + "." + DiagramSet.ADHOC; if (!Objects.equals(formFieldChanged.getName(), adHocFieldName)) { return; } refreshFormPrope... |
@Test @SuppressWarnings("unchecked") public void testProvideFilters() { String arbitraryElementUUID = "arbitraryElementUUID"; Object arbitraryObject = mock(Object.class); Collection<FormElementFilter> result = filterProvider.provideFilters(arbitraryElementUUID, arbitraryObject); assertEquals(1, result.size()); FormElem... | @SuppressWarnings("unchecked") @Override public Collection<FormElementFilter> provideFilters(String elementUUID, Object definition) { FormElementFilter nameFilter = new FormElementFilter("general.name", o -> false); return Collections.singletonList(nameFilter); } | AssociationFilterProvider implements StunnerFormElementFilterProvider { @SuppressWarnings("unchecked") @Override public Collection<FormElementFilter> provideFilters(String elementUUID, Object definition) { FormElementFilter nameFilter = new FormElementFilter("general.name", o -> false); return Collections.singletonList... | AssociationFilterProvider implements StunnerFormElementFilterProvider { @SuppressWarnings("unchecked") @Override public Collection<FormElementFilter> provideFilters(String elementUUID, Object definition) { FormElementFilter nameFilter = new FormElementFilter("general.name", o -> false); return Collections.singletonList... | AssociationFilterProvider implements StunnerFormElementFilterProvider { @SuppressWarnings("unchecked") @Override public Collection<FormElementFilter> provideFilters(String elementUUID, Object definition) { FormElementFilter nameFilter = new FormElementFilter("general.name", o -> false); return Collections.singletonList... | AssociationFilterProvider implements StunnerFormElementFilterProvider { @SuppressWarnings("unchecked") @Override public Collection<FormElementFilter> provideFilters(String elementUUID, Object definition) { FormElementFilter nameFilter = new FormElementFilter("general.name", o -> false); return Collections.singletonList... |
@Test public void testOnFormFieldChangedForMultipleInstance() { FormFieldChanged formFieldChanged = mockFormFieldChanged(IS_MULTIPLE_INSTANCE, UUID); filterProvider.onFormFieldChanged(formFieldChanged); verifyFieldChangeFired(); } | void onFormFieldChanged(@Observes final FormFieldChanged formFieldChanged) { applyFormFieldChange(formFieldChanged); } | MultipleInstanceNodeFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes final FormFieldChanged formFieldChanged) { applyFormFieldChange(formFieldChanged); } } | MultipleInstanceNodeFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes final FormFieldChanged formFieldChanged) { applyFormFieldChange(formFieldChanged); } MultipleInstanceNodeFilterProvider(); MultipleInstanceNodeFilterProvider(final SessionManager sessionManager,
... | MultipleInstanceNodeFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes final FormFieldChanged formFieldChanged) { applyFormFieldChange(formFieldChanged); } MultipleInstanceNodeFilterProvider(); MultipleInstanceNodeFilterProvider(final SessionManager sessionManager,
... | MultipleInstanceNodeFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes final FormFieldChanged formFieldChanged) { applyFormFieldChange(formFieldChanged); } MultipleInstanceNodeFilterProvider(); MultipleInstanceNodeFilterProvider(final SessionManager sessionManager,
... |
@Test public void testGetView() { assertEquals(view, item.getView()); } | public View getView() { return view; } | DecisionComponentsItem { public View getView() { return view; } } | DecisionComponentsItem { public View getView() { return view; } @Inject DecisionComponentsItem(final View view); } | DecisionComponentsItem { public View getView() { return view; } @Inject DecisionComponentsItem(final View view); @PostConstruct void init(); View getView(); void setDecisionComponent(final DecisionComponent decisionComponent); void show(); void hide(); DRGElement getDrgElement(); } | DecisionComponentsItem { public View getView() { return view; } @Inject DecisionComponentsItem(final View view); @PostConstruct void init(); View getView(); void setDecisionComponent(final DecisionComponent decisionComponent); void show(); void hide(); DRGElement getDrgElement(); } |
@Test public void testOnFormFieldChangedForOtherThanMultipleInstance() { FormFieldChanged formFieldChanged = mockFormFieldChanged("anyOtherField", "anyOtherUUID"); filterProvider.onFormFieldChanged(formFieldChanged); verify(refreshFormPropertiesEvent, never()).fire(any()); } | void onFormFieldChanged(@Observes final FormFieldChanged formFieldChanged) { applyFormFieldChange(formFieldChanged); } | MultipleInstanceNodeFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes final FormFieldChanged formFieldChanged) { applyFormFieldChange(formFieldChanged); } } | MultipleInstanceNodeFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes final FormFieldChanged formFieldChanged) { applyFormFieldChange(formFieldChanged); } MultipleInstanceNodeFilterProvider(); MultipleInstanceNodeFilterProvider(final SessionManager sessionManager,
... | MultipleInstanceNodeFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes final FormFieldChanged formFieldChanged) { applyFormFieldChange(formFieldChanged); } MultipleInstanceNodeFilterProvider(); MultipleInstanceNodeFilterProvider(final SessionManager sessionManager,
... | MultipleInstanceNodeFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes final FormFieldChanged formFieldChanged) { applyFormFieldChange(formFieldChanged); } MultipleInstanceNodeFilterProvider(); MultipleInstanceNodeFilterProvider(final SessionManager sessionManager,
... |
@Test public void testGetProviderName() { assertEquals(tested.getClass().getSimpleName(), tested.getProviderName()); } | @Override public String getProviderName() { return getClass().getSimpleName(); } | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } } | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } } | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } @PostConstruct void populateData(); @Override String getProviderName(); @Override SelectorData<String> getSelectorData(final FormRenderingContext context); static void initServer... | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } @PostConstruct void populateData(); @Override String getProviderName(); @Override SelectorData<String> getSelectorData(final FormRenderingContext context); static void initServer... |
@Test @SuppressWarnings("unchecked") public void testGetSelectorData() { RuleFlowGroup group1 = new RuleFlowGroup("g1"); group1.setPathUri("default: RuleFlowGroup group2 = new RuleFlowGroup("g2"); group2.setPathUri("default: RuleFlowGroup group3 = new RuleFlowGroup("g1"); group3.setPathUri("default: List<RuleFlowGroup>... | @Override public SelectorData<String> getSelectorData(final FormRenderingContext context) { requestRuleFlowGroupDataEvent.fire(new RequestRuleFlowGroupDataEvent()); return new SelectorData<>(toMap(dataProvider.getRuleFlowGroupNames()), null); } | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public SelectorData<String> getSelectorData(final FormRenderingContext context) { requestRuleFlowGroupDataEvent.fire(new RequestRuleFlowGroupDataEvent()); return new SelectorData<>(toMap(dataProvider.getRuleFlowGroupNames()), null); } } | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public SelectorData<String> getSelectorData(final FormRenderingContext context) { requestRuleFlowGroupDataEvent.fire(new RequestRuleFlowGroupDataEvent()); return new SelectorData<>(toMap(dataProvider.getRuleFlowGroupNames()), null); } } | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public SelectorData<String> getSelectorData(final FormRenderingContext context) { requestRuleFlowGroupDataEvent.fire(new RequestRuleFlowGroupDataEvent()); return new SelectorData<>(toMap(dataProvider.getRuleFlowGroupNames()), null); } @PostConstruct... | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public SelectorData<String> getSelectorData(final FormRenderingContext context) { requestRuleFlowGroupDataEvent.fire(new RequestRuleFlowGroupDataEvent()); return new SelectorData<>(toMap(dataProvider.getRuleFlowGroupNames()), null); } @PostConstruct... |
@Test public void testGroupWithSameProject() { RuleFlowGroup group1 = new RuleFlowGroup("g1"); group1.setPathUri("default: RuleFlowGroup group2 = new RuleFlowGroup("g1"); group2.setPathUri("default: RuleFlowGroup group3 = new RuleFlowGroup("g1"); group3.setPathUri("default: List<RuleFlowGroup> groups = Arrays.asList(gr... | @Override public SelectorData<String> getSelectorData(final FormRenderingContext context) { requestRuleFlowGroupDataEvent.fire(new RequestRuleFlowGroupDataEvent()); return new SelectorData<>(toMap(dataProvider.getRuleFlowGroupNames()), null); } | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public SelectorData<String> getSelectorData(final FormRenderingContext context) { requestRuleFlowGroupDataEvent.fire(new RequestRuleFlowGroupDataEvent()); return new SelectorData<>(toMap(dataProvider.getRuleFlowGroupNames()), null); } } | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public SelectorData<String> getSelectorData(final FormRenderingContext context) { requestRuleFlowGroupDataEvent.fire(new RequestRuleFlowGroupDataEvent()); return new SelectorData<>(toMap(dataProvider.getRuleFlowGroupNames()), null); } } | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public SelectorData<String> getSelectorData(final FormRenderingContext context) { requestRuleFlowGroupDataEvent.fire(new RequestRuleFlowGroupDataEvent()); return new SelectorData<>(toMap(dataProvider.getRuleFlowGroupNames()), null); } @PostConstruct... | RuleFlowGroupFormProvider implements SelectorDataProvider { @Override public SelectorData<String> getSelectorData(final FormRenderingContext context) { requestRuleFlowGroupDataEvent.fire(new RequestRuleFlowGroupDataEvent()); return new SelectorData<>(toMap(dataProvider.getRuleFlowGroupNames()), null); } @PostConstruct... |
@Test public void testGetProviderName() { assertEquals(tested.getClass().getSimpleName(), tested.getProviderName()); } | @Override public String getProviderName() { return getClass().getSimpleName(); } | CalledElementFormProvider implements SelectorDataProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } } | CalledElementFormProvider implements SelectorDataProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } } | CalledElementFormProvider implements SelectorDataProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } @Override String getProviderName(); @PostConstruct void populateData(); @Override @SuppressWarnings("unchecked") SelectorData getSelectorData(final FormRenderingContext context);... | CalledElementFormProvider implements SelectorDataProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } @Override String getProviderName(); @PostConstruct void populateData(); @Override @SuppressWarnings("unchecked") SelectorData getSelectorData(final FormRenderingContext context);... |
@Test public void testGetSelectorData() { List<String> names = Arrays.asList("p1", "p2", "p3"); when(dataProvider.getProcessIds()).thenReturn(names); FormRenderingContext context = mock(FormRenderingContext.class); SelectorData data = tested.getSelectorData(context); Map values = data.getValues(); assertNotNull(values)... | @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { requestProcessDataEvent.fire(new RequestProcessDataEvent()); return new SelectorData(toMap(dataProvider.getProcessIds()), null); } | CalledElementFormProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { requestProcessDataEvent.fire(new RequestProcessDataEvent()); return new SelectorData(toMap(dataProvider.getProcessIds()), null); } } | CalledElementFormProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { requestProcessDataEvent.fire(new RequestProcessDataEvent()); return new SelectorData(toMap(dataProvider.getProcessIds()), null); } } | CalledElementFormProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { requestProcessDataEvent.fire(new RequestProcessDataEvent()); return new SelectorData(toMap(dataProvider.getProcessIds()), null); } @Override Str... | CalledElementFormProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { requestProcessDataEvent.fire(new RequestProcessDataEvent()); return new SelectorData(toMap(dataProvider.getProcessIds()), null); } @Override Str... |
@Test public void testOnRuleFlowGroupDataChanged() { RuleFlowGroup group1 = new RuleFlowGroup("g1"); RuleFlowGroup group2 = new RuleFlowGroup("g2"); RuleFlowGroupDataEvent event = mock(RuleFlowGroupDataEvent.class); when(event.getGroups()).thenReturn(new RuleFlowGroup[]{group1, group2}); tested.onRuleFlowGroupDataChang... | void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } | RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } } | RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } RuleFlowGroupDataProvider(); @Inject RuleFlowGroupDataProvider(final StunnerFormsHandler formsHandler); } | RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } RuleFlowGroupDataProvider(); @Inject RuleFlowGroupDataProvider(final StunnerFormsHandler formsHandler); List<RuleFlowGroup> getRuleFlowGroupNames(); } | RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } RuleFlowGroupDataProvider(); @Inject RuleFlowGroupDataProvider(final StunnerFormsHandler formsHandler); List<RuleFlowGroup> getRuleFlowGroupNames(); } |
@Test public void testOnRuleFlowGroupDataNotChanged() { RuleFlowGroup group1 = new RuleFlowGroup("g1"); RuleFlowGroup group2 = new RuleFlowGroup("g2"); tested.groups.add(group1); tested.groups.add(group2); RuleFlowGroupDataEvent event = mock(RuleFlowGroupDataEvent.class); when(event.getGroups()).thenReturn(new RuleFlow... | void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } | RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } } | RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } RuleFlowGroupDataProvider(); @Inject RuleFlowGroupDataProvider(final StunnerFormsHandler formsHandler); } | RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } RuleFlowGroupDataProvider(); @Inject RuleFlowGroupDataProvider(final StunnerFormsHandler formsHandler); List<RuleFlowGroup> getRuleFlowGroupNames(); } | RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } RuleFlowGroupDataProvider(); @Inject RuleFlowGroupDataProvider(final StunnerFormsHandler formsHandler); List<RuleFlowGroup> getRuleFlowGroupNames(); } |
@Test public void testGetSelectorData() { SelectorData selectorData = provider.getSelectorData(context); assertNotNull(selectorData.getValues()); assertEquals(2, selectorData.getValues().size()); assertEquals(ExecutionOrder.SEQUENTIAL.value(), selectorData.getSelectedValue()); assertEquals(SEQUENTIAL_LABEL, selectorDat... | @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { Map<Object, String> values = new TreeMap<>(Comparator.comparing(o -> valuePosition.get(o))); Arrays.stream(DataProviderOption.values()) .forEach(scope -> values.put(scope.value(), translationService.getVal... | ExecutionOrderProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { Map<Object, String> values = new TreeMap<>(Comparator.comparing(o -> valuePosition.get(o))); Arrays.stream(DataProviderOption.values()) .forEach(sco... | ExecutionOrderProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { Map<Object, String> values = new TreeMap<>(Comparator.comparing(o -> valuePosition.get(o))); Arrays.stream(DataProviderOption.values()) .forEach(sco... | ExecutionOrderProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { Map<Object, String> values = new TreeMap<>(Comparator.comparing(o -> valuePosition.get(o))); Arrays.stream(DataProviderOption.values()) .forEach(sco... | ExecutionOrderProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { Map<Object, String> values = new TreeMap<>(Comparator.comparing(o -> valuePosition.get(o))); Arrays.stream(DataProviderOption.values()) .forEach(sco... |
@Test public void testGetSelectorDataWhenNoNodeSelected() { setSelectedNode(null); SelectorData result = provider.getSelectorData(renderingContext); assertResult(new ArrayList<>(), result); } | @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(FormRenderingContext context) { final Diagram diagram = sessionManager.getCurrentSession().getCanvasHandler().getDiagram(); final String rootUUID = diagram.getMetadata().getCanvasRootUUID(); final Node<?, ? extends Edge> selectedNode = getSele... | ProcessCompensationRefProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(FormRenderingContext context) { final Diagram diagram = sessionManager.getCurrentSession().getCanvasHandler().getDiagram(); final String rootUUID = diagram.getMetadata().getCanva... | ProcessCompensationRefProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(FormRenderingContext context) { final Diagram diagram = sessionManager.getCurrentSession().getCanvasHandler().getDiagram(); final String rootUUID = diagram.getMetadata().getCanva... | ProcessCompensationRefProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(FormRenderingContext context) { final Diagram diagram = sessionManager.getCurrentSession().getCanvasHandler().getDiagram(); final String rootUUID = diagram.getMetadata().getCanva... | ProcessCompensationRefProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(FormRenderingContext context) { final Diagram diagram = sessionManager.getCurrentSession().getCanvasHandler().getDiagram(); final String rootUUID = diagram.getMetadata().getCanva... |
@Test public void testSetDecisionComponent() { final DecisionComponent decisionComponent = mock(DecisionComponent.class); when(decisionComponent.getIcon()).thenReturn(DECISION_PALETTE); when(decisionComponent.getName()).thenReturn("name"); when(decisionComponent.getFileName()).thenReturn("file"); item.setDecisionCompon... | public void setDecisionComponent(final DecisionComponent decisionComponent) { this.decisionComponent = decisionComponent; setupView(); } | DecisionComponentsItem { public void setDecisionComponent(final DecisionComponent decisionComponent) { this.decisionComponent = decisionComponent; setupView(); } } | DecisionComponentsItem { public void setDecisionComponent(final DecisionComponent decisionComponent) { this.decisionComponent = decisionComponent; setupView(); } @Inject DecisionComponentsItem(final View view); } | DecisionComponentsItem { public void setDecisionComponent(final DecisionComponent decisionComponent) { this.decisionComponent = decisionComponent; setupView(); } @Inject DecisionComponentsItem(final View view); @PostConstruct void init(); View getView(); void setDecisionComponent(final DecisionComponent decisionCompon... | DecisionComponentsItem { public void setDecisionComponent(final DecisionComponent decisionComponent) { this.decisionComponent = decisionComponent; setupView(); } @Inject DecisionComponentsItem(final View view); @PostConstruct void init(); View getView(); void setDecisionComponent(final DecisionComponent decisionCompon... |
@Test public void testGetProviderName() { assertEquals(tested.getClass().getSimpleName(), tested.getProviderName()); } | @Override public String getProviderName() { return getClass().getSimpleName(); } | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } } | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } @Inject ProcessTypeProvider(final SessionManager sessionManager); } | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } @Inject ProcessTypeProvider(final SessionManager sessionManager); @Override String getProviderName(); @Override Predicate<Node> getFilter(); @Override Function<Node, Pair<O... | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public String getProviderName() { return getClass().getSimpleName(); } @Inject ProcessTypeProvider(final SessionManager sessionManager); @Override String getProviderName(); @Override Predicate<Node> getFilter(); @Override Function<Node, Pair<O... |
@Test public void testGetValues() { SelectorData selectorData = tested.getSelectorData(context); assertEquals(2, selectorData.getValues().size()); assertEquals("Public", selectorData.getSelectedValue()); assertTrue(selectorData.getValues().containsValue("Public")); assertTrue(selectorData.getValues().containsValue("Pri... | @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { return new SelectorData(Arrays.asList(TYPES) .stream() .collect(Collectors.toMap(p -> p, p -> p)), "Public"); } | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { return new SelectorData(Arrays.asList(TYPES) .stream() .collect(Collectors.toMap(p -> p, p -> p)), "Public"); } } | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { return new SelectorData(Arrays.asList(TYPES) .stream() .collect(Collectors.toMap(p -> p, p -> p)), "Public"); } @Inject ProcessTypeProvide... | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { return new SelectorData(Arrays.asList(TYPES) .stream() .collect(Collectors.toMap(p -> p, p -> p)), "Public"); } @Inject ProcessTypeProvide... | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { return new SelectorData(Arrays.asList(TYPES) .stream() .collect(Collectors.toMap(p -> p, p -> p)), "Public"); } @Inject ProcessTypeProvide... |
@Test public void testGetFilter() { assertTrue(tested.getFilter().test(new NodeImpl("uuid_1"))); } | @Override public Predicate<Node> getFilter() { return node -> true; } | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public Predicate<Node> getFilter() { return node -> true; } } | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public Predicate<Node> getFilter() { return node -> true; } @Inject ProcessTypeProvider(final SessionManager sessionManager); } | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public Predicate<Node> getFilter() { return node -> true; } @Inject ProcessTypeProvider(final SessionManager sessionManager); @Override String getProviderName(); @Override Predicate<Node> getFilter(); @Override Function<Node, Pair<Object, Stri... | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public Predicate<Node> getFilter() { return node -> true; } @Inject ProcessTypeProvider(final SessionManager sessionManager); @Override String getProviderName(); @Override Predicate<Node> getFilter(); @Override Function<Node, Pair<Object, Stri... |
@Test public void testGetMapper() { assertNull(tested.getMapper()); } | @Override public Function<Node, Pair<Object, String>> getMapper() { return null; } | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public Function<Node, Pair<Object, String>> getMapper() { return null; } } | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public Function<Node, Pair<Object, String>> getMapper() { return null; } @Inject ProcessTypeProvider(final SessionManager sessionManager); } | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public Function<Node, Pair<Object, String>> getMapper() { return null; } @Inject ProcessTypeProvider(final SessionManager sessionManager); @Override String getProviderName(); @Override Predicate<Node> getFilter(); @Override Function<Node, Pair... | ProcessTypeProvider extends AbstractProcessFilteredNodeProvider { @Override public Function<Node, Pair<Object, String>> getMapper() { return null; } @Inject ProcessTypeProvider(final SessionManager sessionManager); @Override String getProviderName(); @Override Predicate<Node> getFilter(); @Override Function<Node, Pair... |
@Test public void testOnProcessesUpdatedEvent() { ProcessDataEvent event = mock(ProcessDataEvent.class); when(event.getProcessIds()).thenReturn(new String[]{"p1", "p2"}); tested.onProcessesUpdatedEvent(event); verify(formsHandler, times(1)).refreshCurrentSessionForms(eq(BPMNDefinitionSet.class)); List<String> values = ... | void onProcessesUpdatedEvent(final @Observes ProcessDataEvent event) { setProcessIds(toList(event.getProcessIds())); } | ProcessesDataProvider { void onProcessesUpdatedEvent(final @Observes ProcessDataEvent event) { setProcessIds(toList(event.getProcessIds())); } } | ProcessesDataProvider { void onProcessesUpdatedEvent(final @Observes ProcessDataEvent event) { setProcessIds(toList(event.getProcessIds())); } ProcessesDataProvider(); @Inject ProcessesDataProvider(final StunnerFormsHandler formsHandler); } | ProcessesDataProvider { void onProcessesUpdatedEvent(final @Observes ProcessDataEvent event) { setProcessIds(toList(event.getProcessIds())); } ProcessesDataProvider(); @Inject ProcessesDataProvider(final StunnerFormsHandler formsHandler); List<String> getProcessIds(); } | ProcessesDataProvider { void onProcessesUpdatedEvent(final @Observes ProcessDataEvent event) { setProcessIds(toList(event.getProcessIds())); } ProcessesDataProvider(); @Inject ProcessesDataProvider(final StunnerFormsHandler formsHandler); List<String> getProcessIds(); } |
@Test public void emptyWidsTest() { List<WorkItemDefinition> defs = WorkItemDefinitionClientParser.parse(""); assertTrue(defs.isEmpty()); defs = WorkItemDefinitionClientParser.parse("[]"); assertTrue(defs.isEmpty()); defs = WorkItemDefinitionClientParser.parse("[\n]"); assertTrue(defs.isEmpty()); defs = WorkItemDefinit... | public static List<WorkItemDefinition> parse(String widStr) { if (empty(widStr)) { return Collections.emptyList(); } List<WorkItemDefinition> widList = new ArrayList<>(); String[] lines = widStr.split("\r\n|\r|\n"); Queue<String> linesQueue = new LinkedList<>(Arrays.asList(lines)); while (!linesQueue.isEmpty()) { Strin... | WorkItemDefinitionClientParser { public static List<WorkItemDefinition> parse(String widStr) { if (empty(widStr)) { return Collections.emptyList(); } List<WorkItemDefinition> widList = new ArrayList<>(); String[] lines = widStr.split("\r\n|\r|\n"); Queue<String> linesQueue = new LinkedList<>(Arrays.asList(lines)); whil... | WorkItemDefinitionClientParser { public static List<WorkItemDefinition> parse(String widStr) { if (empty(widStr)) { return Collections.emptyList(); } List<WorkItemDefinition> widList = new ArrayList<>(); String[] lines = widStr.split("\r\n|\r|\n"); Queue<String> linesQueue = new LinkedList<>(Arrays.asList(lines)); whil... | WorkItemDefinitionClientParser { public static List<WorkItemDefinition> parse(String widStr) { if (empty(widStr)) { return Collections.emptyList(); } List<WorkItemDefinition> widList = new ArrayList<>(); String[] lines = widStr.split("\r\n|\r|\n"); Queue<String> linesQueue = new LinkedList<>(Arrays.asList(lines)); whil... | WorkItemDefinitionClientParser { public static List<WorkItemDefinition> parse(String widStr) { if (empty(widStr)) { return Collections.emptyList(); } List<WorkItemDefinition> widList = new ArrayList<>(); String[] lines = widStr.split("\r\n|\r|\n"); Queue<String> linesQueue = new LinkedList<>(Arrays.asList(lines)); whil... |
@Test @SuppressWarnings("unchecked") public void testIsAutoConnection() { assertFalse(isAutoMagnetConnection(gatewayNode, taskNode)); assertFalse(isAutoMagnetConnection(gatewayNode, eventNode)); assertFalse(isAutoMagnetConnection(taskNode, gatewayNode)); assertFalse(isAutoMagnetConnection(eventNode, gatewayNode)); asse... | public static boolean isAutoMagnetConnection(final Node<View<?>, Edge> sourceNode, final Node<View<?>, Edge> targetNode) { final Object sourceDefinition = null != sourceNode ? sourceNode.getContent().getDefinition() : null; final Object targetDefinition = null != targetNode ? targetNode.getContent().getDefinition() : n... | BPMNCreateNodeAction extends GeneralCreateNodeAction { public static boolean isAutoMagnetConnection(final Node<View<?>, Edge> sourceNode, final Node<View<?>, Edge> targetNode) { final Object sourceDefinition = null != sourceNode ? sourceNode.getContent().getDefinition() : null; final Object targetDefinition = null != t... | BPMNCreateNodeAction extends GeneralCreateNodeAction { public static boolean isAutoMagnetConnection(final Node<View<?>, Edge> sourceNode, final Node<View<?>, Edge> targetNode) { final Object sourceDefinition = null != sourceNode ? sourceNode.getContent().getDefinition() : null; final Object targetDefinition = null != t... | BPMNCreateNodeAction extends GeneralCreateNodeAction { public static boolean isAutoMagnetConnection(final Node<View<?>, Edge> sourceNode, final Node<View<?>, Edge> targetNode) { final Object sourceDefinition = null != sourceNode ? sourceNode.getContent().getDefinition() : null; final Object targetDefinition = null != t... | BPMNCreateNodeAction extends GeneralCreateNodeAction { public static boolean isAutoMagnetConnection(final Node<View<?>, Edge> sourceNode, final Node<View<?>, Edge> targetNode) { final Object sourceDefinition = null != sourceNode ? sourceNode.getContent().getDefinition() : null; final Object targetDefinition = null != t... |
@Test public void init() { tested.init(); FormFiltersProviderFactory.getFilterForDefinition(UUID, diagramDef); verify(bpmnDiagramFilterProvider).provideFilters(UUID, diagramDef); FormFiltersProviderFactory.getFilterForDefinition(UUID, startEventDef); verify(startEventFilterProvider).provideFilters(UUID, startEventDef);... | @PostConstruct public void init() { PatternFlyBootstrapper.ensureMonacoEditorLoaderIsAvailable(); FormFiltersProviderFactory.registerProvider(new StartEventFilterProvider(sessionManager, StartNoneEvent.class)); FormFiltersProviderFactory.registerProvider(new StartEventFilterProvider(sessionManager, StartCompensationEve... | StunnerBPMNEntryPoint { @PostConstruct public void init() { PatternFlyBootstrapper.ensureMonacoEditorLoaderIsAvailable(); FormFiltersProviderFactory.registerProvider(new StartEventFilterProvider(sessionManager, StartNoneEvent.class)); FormFiltersProviderFactory.registerProvider(new StartEventFilterProvider(sessionManag... | StunnerBPMNEntryPoint { @PostConstruct public void init() { PatternFlyBootstrapper.ensureMonacoEditorLoaderIsAvailable(); FormFiltersProviderFactory.registerProvider(new StartEventFilterProvider(sessionManager, StartNoneEvent.class)); FormFiltersProviderFactory.registerProvider(new StartEventFilterProvider(sessionManag... | StunnerBPMNEntryPoint { @PostConstruct public void init() { PatternFlyBootstrapper.ensureMonacoEditorLoaderIsAvailable(); FormFiltersProviderFactory.registerProvider(new StartEventFilterProvider(sessionManager, StartNoneEvent.class)); FormFiltersProviderFactory.registerProvider(new StartEventFilterProvider(sessionManag... | StunnerBPMNEntryPoint { @PostConstruct public void init() { PatternFlyBootstrapper.ensureMonacoEditorLoaderIsAvailable(); FormFiltersProviderFactory.registerProvider(new StartEventFilterProvider(sessionManager, StartNoneEvent.class)); FormFiltersProviderFactory.registerProvider(new StartEventFilterProvider(sessionManag... |
@Test public void validateSerialized() { Collection<BPMNViolation> violations = bpmnValidador.validate(getSerializedProcess(BPMN_VALID), PROCESS_UUID); assertTrue(violations.isEmpty()); } | @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).stream().collect(Collectors.toSet())); return... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... |
@Test public void validateWithExceptionsOnParsingXML() { final Collection<BPMNViolation> violations = bpmnValidador.validate("INVALID_XML", PROCESS_UUID); assertProcessException(violations); } | @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).stream().collect(Collectors.toSet())); return... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... |
@Test public void testShow() { final HTMLElement viewElement = mock(HTMLElement.class); when(view.getElement()).thenReturn(viewElement); viewElement.classList = mock(DOMTokenList.class); item.show(); verify(viewElement.classList).remove(HIDDEN_CSS_CLASS); } | public void show() { HiddenHelper.show(getView().getElement()); } | DecisionComponentsItem { public void show() { HiddenHelper.show(getView().getElement()); } } | DecisionComponentsItem { public void show() { HiddenHelper.show(getView().getElement()); } @Inject DecisionComponentsItem(final View view); } | DecisionComponentsItem { public void show() { HiddenHelper.show(getView().getElement()); } @Inject DecisionComponentsItem(final View view); @PostConstruct void init(); View getView(); void setDecisionComponent(final DecisionComponent decisionComponent); void show(); void hide(); DRGElement getDrgElement(); } | DecisionComponentsItem { public void show() { HiddenHelper.show(getView().getElement()); } @Inject DecisionComponentsItem(final View view); @PostConstruct void init(); View getView(); void setDecisionComponent(final DecisionComponent decisionComponent); void show(); void hide(); DRGElement getDrgElement(); } |
@Test public void validateWithException() { when(diagram.getMetadata()).thenThrow(new RuntimeException()); final Collection<BPMNViolation> violations = bpmnValidador.validate(null, PROCESS_UUID); assertProcessException(violations); } | @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).stream().collect(Collectors.toSet())); return... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... |
@Test public void validateWithViolation() { when(diagramService.getRawContent(diagram)).thenReturn(getSerializedProcess(BPMN_VALIDATION_ISSUES)); bpmnValidador.validate(diagram, result -> { assertNotNull(result); assertEquals(10, result.size()); assertTrue(result.stream().map(DomainViolation::getViolationType).allMatch... | @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).stream().collect(Collectors.toSet())); return... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... |
@Test public void validateNoViolations() { when(diagramService.getRawContent(diagram)).thenReturn(getSerializedProcess(BPMN_VALID)); bpmnValidador.validate(diagram, result -> { assertNotNull(result); assertTrue(result.isEmpty()); }); } | @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).stream().collect(Collectors.toSet())); return... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... | BPMNValidatorImpl implements BPMNValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DomainViolation>> resultConsumer) { String rawContent = diagramService.getRawContent(diagram); if (Objects.nonNull(rawContent)) { resultConsumer.accept(validate(rawContent, diagram.getMetadata().getTitle()).... |
@Test public void getDefinitionSetId() { assertEquals(bpmnValidador.getDefinitionSetId(), BindableAdapterUtils.getDefinitionId(BPMNDefinitionSet.class)); } | @Override public String getDefinitionSetId() { return BindableAdapterUtils.getDefinitionSetId(BPMNDefinitionSet.class); } | BPMNValidatorImpl implements BPMNValidator { @Override public String getDefinitionSetId() { return BindableAdapterUtils.getDefinitionSetId(BPMNDefinitionSet.class); } } | BPMNValidatorImpl implements BPMNValidator { @Override public String getDefinitionSetId() { return BindableAdapterUtils.getDefinitionSetId(BPMNDefinitionSet.class); } BPMNValidatorImpl(); @Inject BPMNValidatorImpl(final @Default DiagramService diagramService); } | BPMNValidatorImpl implements BPMNValidator { @Override public String getDefinitionSetId() { return BindableAdapterUtils.getDefinitionSetId(BPMNDefinitionSet.class); } BPMNValidatorImpl(); @Inject BPMNValidatorImpl(final @Default DiagramService diagramService); @Override void validate(Diagram diagram, Consumer<Collecti... | BPMNValidatorImpl implements BPMNValidator { @Override public String getDefinitionSetId() { return BindableAdapterUtils.getDefinitionSetId(BPMNDefinitionSet.class); } BPMNValidatorImpl(); @Inject BPMNValidatorImpl(final @Default DiagramService diagramService); @Override void validate(Diagram diagram, Consumer<Collecti... |
@Test public void flowElementDecorator() { MarshallingMessageDecorator<FlowElement> decorator = BPMNElementDecorators.flowElementDecorator(); FlowElement element = mock(FlowElement.class); when(element.getName()).thenReturn(NAME); assertEquals(NAME, decorator.getName(element)); assertEquals(element.getClass().getSimple... | public static <T extends FlowElement> MarshallingMessageDecorator<T> flowElementDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.getName()) .orElseGet(o::getId), g -> g.getClass().getSimpleName()); } | BPMNElementDecorators { public static <T extends FlowElement> MarshallingMessageDecorator<T> flowElementDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.getName()) .orElseGet(o::getId), g -> g.getClass().getSimpleName()); } } | BPMNElementDecorators { public static <T extends FlowElement> MarshallingMessageDecorator<T> flowElementDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.getName()) .orElseGet(o::getId), g -> g.getClass().getSimpleName()); } } | BPMNElementDecorators { public static <T extends FlowElement> MarshallingMessageDecorator<T> flowElementDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.getName()) .orElseGet(o::getId), g -> g.getClass().getSimpleName()); } static MarshallingMessageDecorator<T> flowElementDecorator(); sta... | BPMNElementDecorators { public static <T extends FlowElement> MarshallingMessageDecorator<T> flowElementDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.getName()) .orElseGet(o::getId), g -> g.getClass().getSimpleName()); } static MarshallingMessageDecorator<T> flowElementDecorator(); sta... |
@Test public void baseElementDecorator() { MarshallingMessageDecorator<BaseElement> decorator = BPMNElementDecorators.baseElementDecorator(); BaseElement element = mock(FlowElement.class); when(element.getId()).thenReturn(NAME); assertEquals(NAME, decorator.getName(element)); assertEquals(element.getClass().getSimpleNa... | public static <T extends BaseElement> MarshallingMessageDecorator<T> baseElementDecorator() { return MarshallingMessageDecorator.of(BaseElement::getId, g -> g.getClass().getSimpleName()); } | BPMNElementDecorators { public static <T extends BaseElement> MarshallingMessageDecorator<T> baseElementDecorator() { return MarshallingMessageDecorator.of(BaseElement::getId, g -> g.getClass().getSimpleName()); } } | BPMNElementDecorators { public static <T extends BaseElement> MarshallingMessageDecorator<T> baseElementDecorator() { return MarshallingMessageDecorator.of(BaseElement::getId, g -> g.getClass().getSimpleName()); } } | BPMNElementDecorators { public static <T extends BaseElement> MarshallingMessageDecorator<T> baseElementDecorator() { return MarshallingMessageDecorator.of(BaseElement::getId, g -> g.getClass().getSimpleName()); } static MarshallingMessageDecorator<T> flowElementDecorator(); static MarshallingMessageDecorator<T> baseE... | BPMNElementDecorators { public static <T extends BaseElement> MarshallingMessageDecorator<T> baseElementDecorator() { return MarshallingMessageDecorator.of(BaseElement::getId, g -> g.getClass().getSimpleName()); } static MarshallingMessageDecorator<T> flowElementDecorator(); static MarshallingMessageDecorator<T> baseE... |
@Test public void bpmnNodeDecorator() { MarshallingMessageDecorator<BpmnNode> decorator = BPMNElementDecorators.bpmnNodeDecorator(); BpmnNode element = mockBpmnNode(); assertEquals(NAME, decorator.getName(element)); assertEquals(element.value().getContent().getDefinition().getClass().getSimpleName(), decorator.getType(... | public static <T extends BpmnNode> MarshallingMessageDecorator<T> bpmnNodeDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()), bpmnNode -> bpmnNode.value() .getContent() .getDefi... | BPMNElementDecorators { public static <T extends BpmnNode> MarshallingMessageDecorator<T> bpmnNodeDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()), bpmnNode -> bpmnNode.value(... | BPMNElementDecorators { public static <T extends BpmnNode> MarshallingMessageDecorator<T> bpmnNodeDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()), bpmnNode -> bpmnNode.value(... | BPMNElementDecorators { public static <T extends BpmnNode> MarshallingMessageDecorator<T> bpmnNodeDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()), bpmnNode -> bpmnNode.value(... | BPMNElementDecorators { public static <T extends BpmnNode> MarshallingMessageDecorator<T> bpmnNodeDecorator() { return MarshallingMessageDecorator.of(o -> Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()), bpmnNode -> bpmnNode.value(... |
@Test public void resultBpmnDecorator() { MarshallingMessageDecorator<Result> decorator = BPMNElementDecorators.resultBpmnDecorator(); BpmnNode node = mockBpmnNode(); Result result = Result.success(node); assertEquals(NAME, decorator.getName(result)); assertEquals(node.value().getContent().getDefinition().getClass().ge... | public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value(); return Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()); }, r -> { BpmnNode o1... | BPMNElementDecorators { public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value(); return Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()... | BPMNElementDecorators { public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value(); return Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()... | BPMNElementDecorators { public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value(); return Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()... | BPMNElementDecorators { public static MarshallingMessageDecorator<Result> resultBpmnDecorator() { return MarshallingMessageDecorator.of(r -> { BpmnNode o = (BpmnNode) r.value(); return Optional.ofNullable(o.value() .getContent() .getDefinition() .getGeneral() .getName() .getValue()) .orElseGet(() -> o.value().getUUID()... |
@Test public void whenExactlyTest() { UserTaskImpl element = (UserTaskImpl) Bpmn2Factory.eINSTANCE.createUserTask(); Result<BpmnNode> result = match().apply(element); verify(assertUserTask).apply(element); assertTrue(result.isSuccess()); } | public <Sub> Match<In, Out> whenExactly(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return whenExactly_(type, thenWrapped); } | Match { public <Sub> Match<In, Out> whenExactly(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return whenExactly_(type, thenWrapped); } } | Match { public <Sub> Match<In, Out> whenExactly(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return whenExactly_(type, thenWrapped); } Match(Class<?> outputType); } | Match { public <Sub> Match<In, Out> whenExactly(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return whenExactly_(type, thenWrapped); } Match(Class<?> outputType); static Match<In, Out> of(Class<In> inputType, Class<Out> outputType); static Match... | Match { public <Sub> Match<In, Out> whenExactly(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return whenExactly_(type, thenWrapped); } Match(Class<?> outputType); static Match<In, Out> of(Class<In> inputType, Class<Out> outputType); static Match... |
@Test public void whenTest() { EventSubprocess element = Bpmn2Factory.eINSTANCE.createEventSubprocess(); Result<BpmnNode> result = match().apply(element); verify(assertSubProcess).apply(element); assertNotEquals(result.value(), defaultValue); assertTrue(result.isSuccess()); } | public <Sub> Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return when_(type, thenWrapped); } | Match { public <Sub> Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return when_(type, thenWrapped); } } | Match { public <Sub> Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return when_(type, thenWrapped); } Match(Class<?> outputType); } | Match { public <Sub> Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return when_(type, thenWrapped); } Match(Class<?> outputType); static Match<In, Out> of(Class<In> inputType, Class<Out> outputType); static Match<In, Node<? ex... | Match { public <Sub> Match<In, Out> when(Class<Sub> type, Function<Sub, Out> then) { Function<Sub, Result<Out>> thenWrapped = sub -> Result.of(then.apply(sub)); return when_(type, thenWrapped); } Match(Class<?> outputType); static Match<In, Out> of(Class<In> inputType, Class<Out> outputType); static Match<In, Node<? ex... |
@Test public void testHide() { final HTMLElement viewElement = mock(HTMLElement.class); when(view.getElement()).thenReturn(viewElement); viewElement.classList = mock(DOMTokenList.class); item.hide(); verify(viewElement.classList).add(HIDDEN_CSS_CLASS); } | public void hide() { HiddenHelper.hide(getView().getElement()); } | DecisionComponentsItem { public void hide() { HiddenHelper.hide(getView().getElement()); } } | DecisionComponentsItem { public void hide() { HiddenHelper.hide(getView().getElement()); } @Inject DecisionComponentsItem(final View view); } | DecisionComponentsItem { public void hide() { HiddenHelper.hide(getView().getElement()); } @Inject DecisionComponentsItem(final View view); @PostConstruct void init(); View getView(); void setDecisionComponent(final DecisionComponent decisionComponent); void show(); void hide(); DRGElement getDrgElement(); } | DecisionComponentsItem { public void hide() { HiddenHelper.hide(getView().getElement()); } @Inject DecisionComponentsItem(final View view); @PostConstruct void init(); View getView(); void setDecisionComponent(final DecisionComponent decisionComponent); void show(); void hide(); DRGElement getDrgElement(); } |
@Test public void missingTest() { ReceiveTask element = Bpmn2Factory.eINSTANCE.createReceiveTask(); Result<BpmnNode> result = match().apply(element); assertEquals(result.value(), defaultValue); assertTrue(result.isFailure()); } | public <Sub> Match<In, Out> missing(Class<Sub> type) { return when_(type, reportMissing(type)); } | Match { public <Sub> Match<In, Out> missing(Class<Sub> type) { return when_(type, reportMissing(type)); } } | Match { public <Sub> Match<In, Out> missing(Class<Sub> type) { return when_(type, reportMissing(type)); } Match(Class<?> outputType); } | Match { public <Sub> Match<In, Out> missing(Class<Sub> type) { return when_(type, reportMissing(type)); } Match(Class<?> outputType); static Match<In, Out> of(Class<In> inputType, Class<Out> outputType); static Match<In, Node<? extends View<? extends Out>, ?>> ofNode(Class<In> inputType, Class<Out> outputType); static ... | Match { public <Sub> Match<In, Out> missing(Class<Sub> type) { return when_(type, reportMissing(type)); } Match(Class<?> outputType); static Match<In, Out> of(Class<In> inputType, Class<Out> outputType); static Match<In, Node<? extends View<? extends Out>, ?>> ofNode(Class<In> inputType, Class<Out> outputType); static ... |
@Test public void convertEdge() { org.eclipse.bpmn2.SequenceFlow sequenceFlow = Bpmn2Factory.eINSTANCE.createSequenceFlow(); FlowNode source = Bpmn2Factory.eINSTANCE.createUserTask(); sequenceFlow.setSourceRef(source); FlowNode target = Bpmn2Factory.eINSTANCE.createBusinessRuleTask(); sequenceFlow.setTargetRef(target);... | @Override public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) { Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class); SequenceFlow definition = edge.getContent().getDefinition(); SequenceFlowPropertyReader p = propertyReaderFactor... | SequenceFlowConverter implements EdgeConverter<org.eclipse.bpmn2.SequenceFlow> { @Override public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) { Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class); SequenceFlow definition = edge.... | SequenceFlowConverter implements EdgeConverter<org.eclipse.bpmn2.SequenceFlow> { @Override public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) { Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class); SequenceFlow definition = edge.... | SequenceFlowConverter implements EdgeConverter<org.eclipse.bpmn2.SequenceFlow> { @Override public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) { Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class); SequenceFlow definition = edge.... | SequenceFlowConverter implements EdgeConverter<org.eclipse.bpmn2.SequenceFlow> { @Override public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) { Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class); SequenceFlow definition = edge.... |
@Test public void convertTextAnnotation() { TextAnnotation element = Bpmn2Factory.eINSTANCE.createTextAnnotation(); when(typedFactoryManager.newNode(anyString(), eq(org.kie.workbench.common.stunner.bpmn.definition.TextAnnotation.class))).thenReturn(nodeTextAnnotation); when(nodeTextAnnotation.getContent()).thenReturn(c... | @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.FlowElement element) { return Match.of(FlowElement.class, BpmnNode.class) .when(org.eclipse.bpmn2.TextAnnotation.class, this::toTextAnnotation) .when(org.eclipse.bpmn2.DataObjectReference.class, this::toDataObject) .apply(element); } | ArtifactsConverter implements NodeConverter<org.eclipse.bpmn2.FlowElement> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.FlowElement element) { return Match.of(FlowElement.class, BpmnNode.class) .when(org.eclipse.bpmn2.TextAnnotation.class, this::toTextAnnotation) .when(org.eclipse.bpmn2.DataObjectRefer... | ArtifactsConverter implements NodeConverter<org.eclipse.bpmn2.FlowElement> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.FlowElement element) { return Match.of(FlowElement.class, BpmnNode.class) .when(org.eclipse.bpmn2.TextAnnotation.class, this::toTextAnnotation) .when(org.eclipse.bpmn2.DataObjectRefer... | ArtifactsConverter implements NodeConverter<org.eclipse.bpmn2.FlowElement> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.FlowElement element) { return Match.of(FlowElement.class, BpmnNode.class) .when(org.eclipse.bpmn2.TextAnnotation.class, this::toTextAnnotation) .when(org.eclipse.bpmn2.DataObjectRefer... | ArtifactsConverter implements NodeConverter<org.eclipse.bpmn2.FlowElement> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.FlowElement element) { return Match.of(FlowElement.class, BpmnNode.class) .when(org.eclipse.bpmn2.TextAnnotation.class, this::toTextAnnotation) .when(org.eclipse.bpmn2.DataObjectRefer... |
@Test public void convertDataObject() { DataObjectReference element = Bpmn2Factory.eINSTANCE.createDataObjectReference(); when(typedFactoryManager.newNode(anyString(), eq(org.kie.workbench.common.stunner.bpmn.definition.DataObject.class))).thenReturn(nodeDataObject); when(nodeDataObject.getContent()).thenReturn(content... | @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.FlowElement element) { return Match.of(FlowElement.class, BpmnNode.class) .when(org.eclipse.bpmn2.TextAnnotation.class, this::toTextAnnotation) .when(org.eclipse.bpmn2.DataObjectReference.class, this::toDataObject) .apply(element); } | ArtifactsConverter implements NodeConverter<org.eclipse.bpmn2.FlowElement> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.FlowElement element) { return Match.of(FlowElement.class, BpmnNode.class) .when(org.eclipse.bpmn2.TextAnnotation.class, this::toTextAnnotation) .when(org.eclipse.bpmn2.DataObjectRefer... | ArtifactsConverter implements NodeConverter<org.eclipse.bpmn2.FlowElement> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.FlowElement element) { return Match.of(FlowElement.class, BpmnNode.class) .when(org.eclipse.bpmn2.TextAnnotation.class, this::toTextAnnotation) .when(org.eclipse.bpmn2.DataObjectRefer... | ArtifactsConverter implements NodeConverter<org.eclipse.bpmn2.FlowElement> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.FlowElement element) { return Match.of(FlowElement.class, BpmnNode.class) .when(org.eclipse.bpmn2.TextAnnotation.class, this::toTextAnnotation) .when(org.eclipse.bpmn2.DataObjectRefer... | ArtifactsConverter implements NodeConverter<org.eclipse.bpmn2.FlowElement> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.FlowElement element) { return Match.of(FlowElement.class, BpmnNode.class) .when(org.eclipse.bpmn2.TextAnnotation.class, this::toTextAnnotation) .when(org.eclipse.bpmn2.DataObjectRefer... |
@Test public void testIsCase_true() { String id = UUID.randomUUID().toString(); CallActivity callActivity = bpmn2.createCallActivity(); callActivity.setId(id); CustomElement.isCase.of(callActivity).set(Boolean.TRUE); tested = new CallActivityPropertyReader(callActivity, definitionResolver.getDiagram(), definitionResolv... | public boolean isCase() { return CustomElement.isCase.of(element).get(); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isCase() { return CustomElement.isCase.of(element).get(); } } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isCase() { return CustomElement.isCase.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isCase() { return CustomElement.isCase.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isIndependent(); bo... | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isCase() { return CustomElement.isCase.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isIndependent(); bo... |
@Test public void testIsCase_false() { String id = UUID.randomUUID().toString(); CallActivity callActivity = bpmn2.createCallActivity(); callActivity.setId(id); CustomElement.isCase.of(callActivity).set(Boolean.FALSE); tested = new CallActivityPropertyReader(callActivity, definitionResolver.getDiagram(), definitionReso... | public boolean isCase() { return CustomElement.isCase.of(element).get(); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isCase() { return CustomElement.isCase.of(element).get(); } } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isCase() { return CustomElement.isCase.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isCase() { return CustomElement.isCase.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isIndependent(); bo... | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isCase() { return CustomElement.isCase.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isIndependent(); bo... |
@Test public void testIsAdHocAutostart_true() { String id = UUID.randomUUID().toString(); CallActivity callActivity = bpmn2.createCallActivity(); callActivity.setId(id); CustomElement.autoStart.of(callActivity).set(Boolean.TRUE); tested = new CallActivityPropertyReader(callActivity, definitionResolver.getDiagram(), def... | public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isInde... | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isInde... |
@Test public void testIsAdHocAutostart_false() { String id = UUID.randomUUID().toString(); CallActivity callActivity = bpmn2.createCallActivity(); callActivity.setId(id); CustomElement.autoStart.of(callActivity).set(Boolean.FALSE); tested = new CallActivityPropertyReader(callActivity, definitionResolver.getDiagram(), d... | public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isInde... | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isInde... |
@Test public void testIsAsync() { CallActivity callActivity = bpmn2.createCallActivity(); CustomElement.async.of(callActivity).set(Boolean.TRUE); tested = new CallActivityPropertyReader(callActivity, definitionResolver.getDiagram(), definitionResolver); assertTrue(tested.isAsync()); } | public boolean isAsync() { return CustomElement.async.of(element).get(); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAsync() { return CustomElement.async.of(element).get(); } } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAsync() { return CustomElement.async.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAsync() { return CustomElement.async.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isIndependent(); bo... | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public boolean isAsync() { return CustomElement.async.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isIndependent(); bo... |
@Test public void testGetSlaDueDate() { String rawSlaDueDate = "12/25/1983"; CallActivity callActivity = bpmn2.createCallActivity(); CustomElement.slaDueDate.of(callActivity).set(rawSlaDueDate); tested = new CallActivityPropertyReader(callActivity, definitionResolver.getDiagram(), definitionResolver); assertTrue(tested... | public String getSlaDueDate() { return CustomElement.slaDueDate.of(element).get(); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public String getSlaDueDate() { return CustomElement.slaDueDate.of(element).get(); } } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public String getSlaDueDate() { return CustomElement.slaDueDate.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); } | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public String getSlaDueDate() { return CustomElement.slaDueDate.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isIndepen... | CallActivityPropertyReader extends MultipleInstanceActivityPropertyReader { public String getSlaDueDate() { return CustomElement.slaDueDate.of(element).get(); } CallActivityPropertyReader(CallActivity callActivity, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getCalledElement(); boolean isIndepen... |
@Test public void testGetDrgElement() { final DecisionComponent decisionComponent = mock(DecisionComponent.class); final DRGElement expectedDrgElement = null; when(decisionComponent.getDrgElement()).thenReturn(expectedDrgElement); doReturn(decisionComponent).when(item).getDecisionComponent(); final DRGElement actualDrg... | public DRGElement getDrgElement() { return getDecisionComponent().getDrgElement(); } | DecisionComponentsItem { public DRGElement getDrgElement() { return getDecisionComponent().getDrgElement(); } } | DecisionComponentsItem { public DRGElement getDrgElement() { return getDecisionComponent().getDrgElement(); } @Inject DecisionComponentsItem(final View view); } | DecisionComponentsItem { public DRGElement getDrgElement() { return getDecisionComponent().getDrgElement(); } @Inject DecisionComponentsItem(final View view); @PostConstruct void init(); View getView(); void setDecisionComponent(final DecisionComponent decisionComponent); void show(); void hide(); DRGElement getDrgEle... | DecisionComponentsItem { public DRGElement getDrgElement() { return getDecisionComponent().getDrgElement(); } @Inject DecisionComponentsItem(final View view); @PostConstruct void init(); View getView(); void setDecisionComponent(final DecisionComponent decisionComponent); void show(); void hide(); DRGElement getDrgEle... |
@Test public void getExtendedName() { String name = tested.getName(); assertEquals("custom", name); } | public String getName() { return CustomElement.name.of(element).get(); } | DataObjectPropertyReader extends BasePropertyReader { public String getName() { return CustomElement.name.of(element).get(); } } | DataObjectPropertyReader extends BasePropertyReader { public String getName() { return CustomElement.name.of(element).get(); } DataObjectPropertyReader(DataObjectReference ref, BPMNDiagram diagram,
BPMNShape shape,
double resolutionFactor); } | DataObjectPropertyReader extends BasePropertyReader { public String getName() { return CustomElement.name.of(element).get(); } DataObjectPropertyReader(DataObjectReference ref, BPMNDiagram diagram,
BPMNShape shape,
double resolutionFactor); String ... | DataObjectPropertyReader extends BasePropertyReader { public String getName() { return CustomElement.name.of(element).get(); } DataObjectPropertyReader(DataObjectReference ref, BPMNDiagram diagram,
BPMNShape shape,
double resolutionFactor); String ... |
@Test public void getName() { when(dataObject.getExtensionValues()).thenReturn(Collections.emptyList()); String name = tested.getName(); assertEquals("name", name); } | public String getName() { return CustomElement.name.of(element).get(); } | DataObjectPropertyReader extends BasePropertyReader { public String getName() { return CustomElement.name.of(element).get(); } } | DataObjectPropertyReader extends BasePropertyReader { public String getName() { return CustomElement.name.of(element).get(); } DataObjectPropertyReader(DataObjectReference ref, BPMNDiagram diagram,
BPMNShape shape,
double resolutionFactor); } | DataObjectPropertyReader extends BasePropertyReader { public String getName() { return CustomElement.name.of(element).get(); } DataObjectPropertyReader(DataObjectReference ref, BPMNDiagram diagram,
BPMNShape shape,
double resolutionFactor); String ... | DataObjectPropertyReader extends BasePropertyReader { public String getName() { return CustomElement.name.of(element).get(); } DataObjectPropertyReader(DataObjectReference ref, BPMNDiagram diagram,
BPMNShape shape,
double resolutionFactor); String ... |
@Test public void testNullBody() { final Assignment assignment = createAssignment(null); final InputAssignmentReader iar = new InputAssignmentReader(assignment, ID); final AssociationDeclaration associationDeclaration = iar.getAssociationDeclaration(); assertEquals(AssociationDeclaration.Type.FromTo, associationDeclara... | public AssociationDeclaration getAssociationDeclaration() { return associationDeclaration; } | InputAssignmentReader { public AssociationDeclaration getAssociationDeclaration() { return associationDeclaration; } } | InputAssignmentReader { public AssociationDeclaration getAssociationDeclaration() { return associationDeclaration; } InputAssignmentReader(Assignment assignment, String targetName); InputAssignmentReader(ItemAwareElement source, String targetName); } | InputAssignmentReader { public AssociationDeclaration getAssociationDeclaration() { return associationDeclaration; } InputAssignmentReader(Assignment assignment, String targetName); InputAssignmentReader(ItemAwareElement source, String targetName); static InputAssignmentReader fromAssociation(DataInputAssociation in)... | InputAssignmentReader { public AssociationDeclaration getAssociationDeclaration() { return associationDeclaration; } InputAssignmentReader(Assignment assignment, String targetName); InputAssignmentReader(ItemAwareElement source, String targetName); static InputAssignmentReader fromAssociation(DataInputAssociation in)... |
@Test public void testGetSourcePositionWithNoWaypoint() { when(edge.getWaypoint()).thenReturn(Collections.emptyList()); Point2D point = PropertyReaderUtils.getSourcePosition(definitionResolver, EDGE_ID, SHAPE_ID); assertPoint(BOUNDS_WIDTH, BOUNDS_HEIGHT / 2, point); } | public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = definitionResolver.getEdg... | PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = def... |
@Test public void testGetSourcePositionWithWaypoint() { when(edge.getWaypoint()).thenReturn(Collections.singletonList(point)); Point2D point = PropertyReaderUtils.getSourcePosition(definitionResolver, EDGE_ID, SHAPE_ID); assertPoint(WAY_POINT_X - BOUNDS_X, WAY_POINT_Y - BOUNDS_Y, point); } | public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = definitionResolver.getEdg... | PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = def... |
@Test public void testGetTargetPositionWithNoWaypoint() { when(edge.getWaypoint()).thenReturn(Collections.emptyList()); Point2D point = PropertyReaderUtils.getTargetPosition(definitionResolver, EDGE_ID, SHAPE_ID); assertPoint(0, BOUNDS_HEIGHT / 2, point); } | public static Point2D getTargetPosition(DefinitionResolver definitionResolver, String edgeId, String targetId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds targetBounds = definitionResolver.getShape(targetId).getBounds(); final List<Point> waypoint = definitionResolver.getEdg... | PropertyReaderUtils { public static Point2D getTargetPosition(DefinitionResolver definitionResolver, String edgeId, String targetId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds targetBounds = definitionResolver.getShape(targetId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getTargetPosition(DefinitionResolver definitionResolver, String edgeId, String targetId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds targetBounds = definitionResolver.getShape(targetId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getTargetPosition(DefinitionResolver definitionResolver, String edgeId, String targetId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds targetBounds = definitionResolver.getShape(targetId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getTargetPosition(DefinitionResolver definitionResolver, String edgeId, String targetId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds targetBounds = definitionResolver.getShape(targetId).getBounds(); final List<Point> waypoint = def... |
@Test public void testGetTargetPositionWithWaypoint() { when(edge.getWaypoint()).thenReturn(Collections.singletonList(point)); Point2D point = PropertyReaderUtils.getTargetPosition(definitionResolver, EDGE_ID, SHAPE_ID); assertPoint(WAY_POINT_X - BOUNDS_X, WAY_POINT_Y - BOUNDS_Y, point); } | public static Point2D getTargetPosition(DefinitionResolver definitionResolver, String edgeId, String targetId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds targetBounds = definitionResolver.getShape(targetId).getBounds(); final List<Point> waypoint = definitionResolver.getEdg... | PropertyReaderUtils { public static Point2D getTargetPosition(DefinitionResolver definitionResolver, String edgeId, String targetId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds targetBounds = definitionResolver.getShape(targetId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getTargetPosition(DefinitionResolver definitionResolver, String edgeId, String targetId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds targetBounds = definitionResolver.getShape(targetId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getTargetPosition(DefinitionResolver definitionResolver, String edgeId, String targetId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds targetBounds = definitionResolver.getShape(targetId).getBounds(); final List<Point> waypoint = def... | PropertyReaderUtils { public static Point2D getTargetPosition(DefinitionResolver definitionResolver, String edgeId, String targetId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds targetBounds = definitionResolver.getShape(targetId).getBounds(); final List<Point> waypoint = def... |
@Test public void testGetControlPointsWhenZeroPoints() { when(edge.getWaypoint()).thenReturn(Collections.emptyList()); List<Point2D> result = PropertyReaderUtils.getControlPoints(definitionResolver, EDGE_ID); assertTrue(result.isEmpty()); } | public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>(); if (waypoint.size(... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... |
@Test public void testGetControlPointsWhenOnePoints() { List<Point> waypoints = mockPoints(1, 2, 1); when(edge.getWaypoint()).thenReturn(waypoints); List<Point2D> result = PropertyReaderUtils.getControlPoints(definitionResolver, EDGE_ID); assertTrue(result.isEmpty()); } | public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>(); if (waypoint.size(... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... |
@Test public void testGetControlPointsWhenTwoPoints() { List<Point> waypoints = mockPoints(1, 2, 2); when(edge.getWaypoint()).thenReturn(waypoints); List<Point2D> result = PropertyReaderUtils.getControlPoints(definitionResolver, EDGE_ID); assertTrue(result.isEmpty()); } | public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>(); if (waypoint.size(... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... | PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>... |
@Test public void testInit() { decisionComponents.init(); verify(view).init(decisionComponents); } | @PostConstruct public void init() { view.init(this); } | DecisionComponents { @PostConstruct public void init() { view.init(this); } } | DecisionComponents { @PostConstruct public void init() { view.init(this); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... | DecisionComponents { @PostConstruct public void init() { view.init(this); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... | DecisionComponents { @PostConstruct public void init() { view.init(this); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... |
@Test public void toWSDLImports() { final String LOCATION = "location"; final String NAMESPACE = "namespace"; WSDLImport wsdlImport = new WSDLImport(LOCATION, NAMESPACE); Import imp = PropertyWriterUtils.toImport(wsdlImport); WSDLImport result = PropertyReaderUtils.toWSDLImports(imp); assertEquals("location", result.ge... | public static WSDLImport toWSDLImports(Import imp) { return new WSDLImport(imp.getLocation(), imp.getNamespace()); } | PropertyReaderUtils { public static WSDLImport toWSDLImports(Import imp) { return new WSDLImport(imp.getLocation(), imp.getNamespace()); } } | PropertyReaderUtils { public static WSDLImport toWSDLImports(Import imp) { return new WSDLImport(imp.getLocation(), imp.getNamespace()); } } | PropertyReaderUtils { public static WSDLImport toWSDLImports(Import imp) { return new WSDLImport(imp.getLocation(), imp.getNamespace()); } static Point2D getSourcePosition(DefinitionResolver definitionResolver,
String edgeId,
Strin... | PropertyReaderUtils { public static WSDLImport toWSDLImports(Import imp) { return new WSDLImport(imp.getLocation(), imp.getNamespace()); } static Point2D getSourcePosition(DefinitionResolver definitionResolver,
String edgeId,
Strin... |
@Test public void testNullTimeParameters() { assertEquals(new SimulationAttributeSet(), SimulationAttributeSets.of(simulationParameters)); } | public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime.getParameterValue() == nu... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... |
@Test public void testTimeParamsWithNullValue() { TimeParameters timeParameters = factory.createTimeParameters(); simulationParameters.setTimeParameters(timeParameters); assertEquals(new SimulationAttributeSet(), SimulationAttributeSets.of(simulationParameters)); } | public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime.getParameterValue() == nu... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... |
@Test public void testTimeParamsWithEmptyParameter() { TimeParameters timeParameters = factory.createTimeParameters(); Parameter parameter = factory.createParameter(); timeParameters.setProcessingTime(parameter); simulationParameters.setTimeParameters(timeParameters); assertEquals(new SimulationAttributeSet(), Simulati... | public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime.getParameterValue() == nu... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... | SimulationAttributeSets { public static SimulationAttributeSet of(ElementParameters eleType) { TimeParameters timeParams = eleType.getTimeParameters(); if (timeParams == null) { return new SimulationAttributeSet(); } Parameter processingTime = timeParams.getProcessingTime(); if (processingTime == null || processingTime... |
@Test public void JBPM_7523_shouldPreserveNameChars() { PropertyReaderFactory factory = new PropertyReaderFactory( new TestDefinitionsWriter().getDefinitionResolver()); Lane lane = bpmn2.createLane(); PropertyWriterFactory writerFactory = new PropertyWriterFactory(); LanePropertyWriter w = writerFactory.of(lane); Strin... | public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } } | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } LanePropertyReader(Lane el, BPMNDiagram diagram, BPMNShape shape, BPMNShape parentLaneSha... | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } LanePropertyReader(Lane el, BPMNDiagram diagram, BPMNShape shape, BPMNShape parentLaneSha... | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } LanePropertyReader(Lane el, BPMNDiagram diagram, BPMNShape shape, BPMNShape parentLaneSha... |
@Test public void testGetRectangleDimensionsSet() { LanePropertyReader propertyReader = new LanePropertyReader(lane, diagram, shape, RESOLUTION_FACTOR); RectangleDimensionsSet dimensionsSet = propertyReader.getRectangleDimensionsSet(); assertRectangleDimensions(WIDTH * RESOLUTION_FACTOR, HEIGHT * RESOLUTION_FACTOR, dim... | @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null || parentLaneShape == null) { return super.getRectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(parentLaneShape.getBounds().getWidth() * resolutionFactor, bounds.getHe... | LanePropertyReader extends BasePropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null || parentLaneShape == null) { return super.getRectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(parentLaneShape.getBoun... | LanePropertyReader extends BasePropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null || parentLaneShape == null) { return super.getRectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(parentLaneShape.getBoun... | LanePropertyReader extends BasePropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null || parentLaneShape == null) { return super.getRectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(parentLaneShape.getBoun... | LanePropertyReader extends BasePropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null || parentLaneShape == null) { return super.getRectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(parentLaneShape.getBoun... |
@Test public void testGetRectangleDimensionsSetWithParentShape() { LanePropertyReader propertyReader = new LanePropertyReader(lane, diagram, shape, parentLaneShape, RESOLUTION_FACTOR); RectangleDimensionsSet dimensionsSet = propertyReader.getRectangleDimensionsSet(); assertRectangleDimensions(PARENT_WIDTH * RESOLUTION_... | @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null || parentLaneShape == null) { return super.getRectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(parentLaneShape.getBounds().getWidth() * resolutionFactor, bounds.getHe... | LanePropertyReader extends BasePropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null || parentLaneShape == null) { return super.getRectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(parentLaneShape.getBoun... | LanePropertyReader extends BasePropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null || parentLaneShape == null) { return super.getRectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(parentLaneShape.getBoun... | LanePropertyReader extends BasePropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null || parentLaneShape == null) { return super.getRectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(parentLaneShape.getBoun... | LanePropertyReader extends BasePropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null || parentLaneShape == null) { return super.getRectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(parentLaneShape.getBoun... |
@Test public void testGetNameFromExtensionElement() { List<ExtensionAttributeValue> extensionValues = mockExtensionValues(DroolsPackage.Literals.DOCUMENT_ROOT__META_DATA, METADATA_ELEMENT_NAME, NAME); when(lane.getName()).thenReturn(null); when(lane.getExtensionValues()).thenReturn(extensionValues); LanePropertyReader ... | public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } } | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } LanePropertyReader(Lane el, BPMNDiagram diagram, BPMNShape shape, BPMNShape parentLaneSha... | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } LanePropertyReader(Lane el, BPMNDiagram diagram, BPMNShape shape, BPMNShape parentLaneSha... | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } LanePropertyReader(Lane el, BPMNDiagram diagram, BPMNShape shape, BPMNShape parentLaneSha... |
@Test public void testGetNameFromNameValue() { LanePropertyReader propertyReader = new LanePropertyReader(lane, diagram, shape, RESOLUTION_FACTOR); when(lane.getExtensionValues()).thenReturn(null); when(lane.getName()).thenReturn(NAME); assertEquals(NAME, propertyReader.getName()); } | public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } } | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } LanePropertyReader(Lane el, BPMNDiagram diagram, BPMNShape shape, BPMNShape parentLaneSha... | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } LanePropertyReader(Lane el, BPMNDiagram diagram, BPMNShape shape, BPMNShape parentLaneSha... | LanePropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return extendedName.isEmpty() ? Optional.ofNullable(lane.getName()).orElse("") : extendedName; } LanePropertyReader(Lane el, BPMNDiagram diagram, BPMNShape shape, BPMNShape parentLaneSha... |
@Test public void getExtendedName() { String name = tested.getName(); assertEquals("custom", name); } | public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } } | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... |
@Test public void testGetView() { assertEquals(view, decisionComponents.getView()); } | public View getView() { return view; } | DecisionComponents { public View getView() { return view; } } | DecisionComponents { public View getView() { return view; } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... | DecisionComponents { public View getView() { return view; } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... | DecisionComponents { public View getView() { return view; } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... |
@Test public void getName() { when(element.getExtensionValues()).thenReturn(Collections.emptyList()); String name = tested.getName(); assertEquals("name", name); } | public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } } | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... |
@Test public void getTextName() { when(element.getExtensionValues()).thenReturn(Collections.emptyList()); when(element.getName()).thenReturn(null); String name = tested.getName(); assertEquals("text", name); } | public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } } | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... |
@Test public void getNameNull() { when(element.getExtensionValues()).thenReturn(Collections.emptyList()); when(element.getName()).thenReturn(null); when(element.getText()).thenReturn(null); String name = tested.getName(); assertEquals("", name); } | public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } } | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... | TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return StringUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram ... |
@Test public void ofDefinition() { assertTrue(tested.of(definitions) instanceof DefinitionsPropertyReader); } | public FlowElementPropertyReader of(FlowElement el) { return new FlowElementPropertyReader(el, diagram, definitionResolver.getShape(el.getId()), definitionResolver.getResolutionFactor()); } | PropertyReaderFactory { public FlowElementPropertyReader of(FlowElement el) { return new FlowElementPropertyReader(el, diagram, definitionResolver.getShape(el.getId()), definitionResolver.getResolutionFactor()); } } | PropertyReaderFactory { public FlowElementPropertyReader of(FlowElement el) { return new FlowElementPropertyReader(el, diagram, definitionResolver.getShape(el.getId()), definitionResolver.getResolutionFactor()); } PropertyReaderFactory(DefinitionResolver definitionResolver); } | PropertyReaderFactory { public FlowElementPropertyReader of(FlowElement el) { return new FlowElementPropertyReader(el, diagram, definitionResolver.getShape(el.getId()), definitionResolver.getResolutionFactor()); } PropertyReaderFactory(DefinitionResolver definitionResolver); FlowElementPropertyReader of(FlowElement el)... | PropertyReaderFactory { public FlowElementPropertyReader of(FlowElement el) { return new FlowElementPropertyReader(el, diagram, definitionResolver.getShape(el.getId()), definitionResolver.getResolutionFactor()); } PropertyReaderFactory(DefinitionResolver definitionResolver); FlowElementPropertyReader of(FlowElement el)... |
@Test public void testGetPropertyName() { when(property.getName()).thenReturn(NAME); when(property.getId()).thenReturn(ID); testGetName(NAME, property); } | public String getName() { return name; } | ItemNameReader { public String getName() { return name; } } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } |
@Test public void testGetPropertyID() { when(property.getName()).thenReturn(null); when(property.getId()).thenReturn(ID); testGetName(ID, property); } | public String getName() { return name; } | ItemNameReader { public String getName() { return name; } } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } |
@Test public void testGetDataInputName() { when(dataInput.getName()).thenReturn(NAME); when(dataInput.getId()).thenReturn(ID); testGetName(NAME, dataInput); } | public String getName() { return name; } | ItemNameReader { public String getName() { return name; } } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } |
@Test public void testGetDataInputID() { when(dataInput.getName()).thenReturn(null); when(dataInput.getId()).thenReturn(ID); testGetName(ID, dataInput); } | public String getName() { return name; } | ItemNameReader { public String getName() { return name; } } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } |
@Test public void testGetDataOutputName() { when(dataOutput.getName()).thenReturn(NAME); when(dataOutput.getId()).thenReturn(ID); testGetName(NAME, dataOutput); } | public String getName() { return name; } | ItemNameReader { public String getName() { return name; } } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } |
@Test public void testGetDataOutputID() { when(dataOutput.getName()).thenReturn(null); when(dataOutput.getId()).thenReturn(ID); testGetName(ID, dataOutput); } | public String getName() { return name; } | ItemNameReader { public String getName() { return name; } } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } |
@Test public void testRefresh() { final Consumer<List<DMNIncludedNode>> listConsumer = (list) -> {}; final List<DMNIncludedModel> includedModels = new ArrayList<>(); includedModels.add(makeDMNIncludedModel(": includedModels.add(makeDMNIncludedModel(": doReturn(includedModels).when(decisionComponents).getDMNIncludedMode... | public void refresh() { if (!dmnDiagramsSession.isSessionStatePresent()) { return; } if (!isIncludedNodeListsUpdated()) { refreshIncludedNodesList(); } loadModelComponents(); } | DecisionComponents { public void refresh() { if (!dmnDiagramsSession.isSessionStatePresent()) { return; } if (!isIncludedNodeListsUpdated()) { refreshIncludedNodesList(); } loadModelComponents(); } } | DecisionComponents { public void refresh() { if (!dmnDiagramsSession.isSessionStatePresent()) { return; } if (!isIncludedNodeListsUpdated()) { refreshIncludedNodesList(); } loadModelComponents(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsCli... | DecisionComponents { public void refresh() { if (!dmnDiagramsSession.isSessionStatePresent()) { return; } if (!isIncludedNodeListsUpdated()) { refreshIncludedNodesList(); } loadModelComponents(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsCli... | DecisionComponents { public void refresh() { if (!dmnDiagramsSession.isSessionStatePresent()) { return; } if (!isIncludedNodeListsUpdated()) { refreshIncludedNodesList(); } loadModelComponents(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsCli... |
@Test public void testGetDocumentFromImportsWithImportsFileIsImported() { includedModels.add(new PMMLIncludedModel(NAME, PACKAGE, IMPORT_PATH, DMNImportTypes.DMN.getDefaultNamespace(), MODEL_COUNT)); when(pathsHelper.getRelativeURI(dmnModelPath, includedModelPath)).thenReturn(IMPORT_PATH); assertThat(filter.getDocument... | public PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath, final Path includedModelPath, final List<PMMLIncludedModel> includedModels) { final Optional<PMMLIncludedModel> documentImport = getDocumentImport(dmnModelPath, includedModelPath, includedModels); return documentImport .map(pmml -> pmmlDocument... | PMMLIncludedDocumentsFilter { public PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath, final Path includedModelPath, final List<PMMLIncludedModel> includedModels) { final Optional<PMMLIncludedModel> documentImport = getDocumentImport(dmnModelPath, includedModelPath, includedModels); return documentIm... | PMMLIncludedDocumentsFilter { public PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath, final Path includedModelPath, final List<PMMLIncludedModel> includedModels) { final Optional<PMMLIncludedModel> documentImport = getDocumentImport(dmnModelPath, includedModelPath, includedModels); return documentIm... | PMMLIncludedDocumentsFilter { public PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath, final Path includedModelPath, final List<PMMLIncludedModel> includedModels) { final Optional<PMMLIncludedModel> documentImport = getDocumentImport(dmnModelPath, includedModelPath, includedModels); return documentIm... | PMMLIncludedDocumentsFilter { public PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath, final Path includedModelPath, final List<PMMLIncludedModel> includedModels) { final Optional<PMMLIncludedModel> documentImport = getDocumentImport(dmnModelPath, includedModelPath, includedModels); return documentIm... |
@Test public void testGetDataObject() { when(dataObject.getName()).thenReturn(null); when(dataObject.getId()).thenReturn(ID); testGetName(ID, dataObject); } | public String getName() { return name; } | ItemNameReader { public String getName() { return name; } } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } | ItemNameReader { public String getName() { return name; } private ItemNameReader(ItemAwareElement element); static ItemNameReader from(ItemAwareElement element); String getName(); } |
@Test public void testGetCollectionInput() { ItemAwareElement item = mockItemAwareElement(ITEM_ID); when(miloop.getLoopDataInputRef()).thenReturn(item); List<DataInputAssociation> inputAssociations = Collections.singletonList(mockDataInputAssociation(ITEM_ID, PROPERTY_ID)); when(activity.getDataInputAssociations()).the... | public String getCollectionInput() { String ieDataInputId = getLoopDataInputRefId(); return super.getDataInputAssociations().stream() .filter(dia -> hasTargetRef(dia, ieDataInputId)) .filter(MultipleInstanceActivityPropertyReader::hasSourceRefs) .map(dia -> ItemNameReader.from(dia.getSourceRef().get(0)).getName()) .fin... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCollectionInput() { String ieDataInputId = getLoopDataInputRefId(); return super.getDataInputAssociations().stream() .filter(dia -> hasTargetRef(dia, ieDataInputId)) .filter(MultipleInstanceActivityPropertyReader::hasSourceRefs) .m... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCollectionInput() { String ieDataInputId = getLoopDataInputRefId(); return super.getDataInputAssociations().stream() .filter(dia -> hasTargetRef(dia, ieDataInputId)) .filter(MultipleInstanceActivityPropertyReader::hasSourceRefs) .m... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCollectionInput() { String ieDataInputId = getLoopDataInputRefId(); return super.getDataInputAssociations().stream() .filter(dia -> hasTargetRef(dia, ieDataInputId)) .filter(MultipleInstanceActivityPropertyReader::hasSourceRefs) .m... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCollectionInput() { String ieDataInputId = getLoopDataInputRefId(); return super.getDataInputAssociations().stream() .filter(dia -> hasTargetRef(dia, ieDataInputId)) .filter(MultipleInstanceActivityPropertyReader::hasSourceRefs) .m... |
@Test public void testGetDataInput() { DataInput item = mockDataInput(ITEM_ID, PROPERTY_ID); when(miloop.getInputDataItem()).thenReturn(item); assertEquals(PROPERTY_ID + DELIMITER + DATA_TYPE, reader.getDataInput()); } | public String getDataInput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getInputDataItem) .map(MultipleInstanceActivityPropertyReader::createInputVariable) .orElse(""); } | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataInput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getInputDataItem) .map(MultipleInstanceActivityPropertyReader::createInputVariable) .orElse(""); } } | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataInput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getInputDataItem) .map(MultipleInstanceActivityPropertyReader::createInputVariable) .orElse(""); } MultipleInstanceActivityPropertyRe... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataInput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getInputDataItem) .map(MultipleInstanceActivityPropertyReader::createInputVariable) .orElse(""); } MultipleInstanceActivityPropertyRe... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataInput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getInputDataItem) .map(MultipleInstanceActivityPropertyReader::createInputVariable) .orElse(""); } MultipleInstanceActivityPropertyRe... |
@Test public void testGetEmptyDataInput() { DataInput item = mockDataInput(ITEM_ID, null); when(miloop.getInputDataItem()).thenReturn(item); assertEquals(ITEM_ID + DELIMITER + DATA_TYPE, reader.getDataInput()); } | public String getDataInput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getInputDataItem) .map(MultipleInstanceActivityPropertyReader::createInputVariable) .orElse(""); } | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataInput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getInputDataItem) .map(MultipleInstanceActivityPropertyReader::createInputVariable) .orElse(""); } } | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataInput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getInputDataItem) .map(MultipleInstanceActivityPropertyReader::createInputVariable) .orElse(""); } MultipleInstanceActivityPropertyRe... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataInput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getInputDataItem) .map(MultipleInstanceActivityPropertyReader::createInputVariable) .orElse(""); } MultipleInstanceActivityPropertyRe... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataInput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getInputDataItem) .map(MultipleInstanceActivityPropertyReader::createInputVariable) .orElse(""); } MultipleInstanceActivityPropertyRe... |
@Test public void testGetEmptyDataOutput() { DataOutput item = mockDataOutput(ITEM_ID, null); when(miloop.getOutputDataItem()).thenReturn(item); assertEquals(ITEM_ID + DELIMITER + DATA_TYPE, reader.getDataOutput()); } | public String getDataOutput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getOutputDataItem) .map(MultipleInstanceActivityPropertyReader::createOutputVariable) .orElse(""); } | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataOutput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getOutputDataItem) .map(MultipleInstanceActivityPropertyReader::createOutputVariable) .orElse(""); } } | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataOutput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getOutputDataItem) .map(MultipleInstanceActivityPropertyReader::createOutputVariable) .orElse(""); } MultipleInstanceActivityPropert... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataOutput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getOutputDataItem) .map(MultipleInstanceActivityPropertyReader::createOutputVariable) .orElse(""); } MultipleInstanceActivityPropert... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataOutput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getOutputDataItem) .map(MultipleInstanceActivityPropertyReader::createOutputVariable) .orElse(""); } MultipleInstanceActivityPropert... |
@Test public void testGetCollectionOutput() { ItemAwareElement item = mockItemAwareElement(ITEM_ID); when(miloop.getLoopDataOutputRef()).thenReturn(item); List<DataOutputAssociation> outputAssociations = Collections.singletonList(mockDataOutputAssociation(ITEM_ID, PROPERTY_ID)); when(activity.getDataOutputAssociations(... | public String getCollectionOutput() { String ieDataOutputId = getLoopDataOutputRefId(); return super.getDataOutputAssociations().stream() .filter(doa -> hasSourceRef(doa, ieDataOutputId)) .map(doa -> ItemNameReader.from(doa.getTargetRef()).getName()) .findFirst() .orElse(null); } | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCollectionOutput() { String ieDataOutputId = getLoopDataOutputRefId(); return super.getDataOutputAssociations().stream() .filter(doa -> hasSourceRef(doa, ieDataOutputId)) .map(doa -> ItemNameReader.from(doa.getTargetRef()).getName(... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCollectionOutput() { String ieDataOutputId = getLoopDataOutputRefId(); return super.getDataOutputAssociations().stream() .filter(doa -> hasSourceRef(doa, ieDataOutputId)) .map(doa -> ItemNameReader.from(doa.getTargetRef()).getName(... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCollectionOutput() { String ieDataOutputId = getLoopDataOutputRefId(); return super.getDataOutputAssociations().stream() .filter(doa -> hasSourceRef(doa, ieDataOutputId)) .map(doa -> ItemNameReader.from(doa.getTargetRef()).getName(... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCollectionOutput() { String ieDataOutputId = getLoopDataOutputRefId(); return super.getDataOutputAssociations().stream() .filter(doa -> hasSourceRef(doa, ieDataOutputId)) .map(doa -> ItemNameReader.from(doa.getTargetRef()).getName(... |
@Test public void testGetDataOutput() { DataOutput item = mockDataOutput(ITEM_ID, PROPERTY_ID); when(miloop.getOutputDataItem()).thenReturn(item); assertEquals(PROPERTY_ID + DELIMITER + DATA_TYPE, reader.getDataOutput()); } | public String getDataOutput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getOutputDataItem) .map(MultipleInstanceActivityPropertyReader::createOutputVariable) .orElse(""); } | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataOutput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getOutputDataItem) .map(MultipleInstanceActivityPropertyReader::createOutputVariable) .orElse(""); } } | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataOutput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getOutputDataItem) .map(MultipleInstanceActivityPropertyReader::createOutputVariable) .orElse(""); } MultipleInstanceActivityPropert... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataOutput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getOutputDataItem) .map(MultipleInstanceActivityPropertyReader::createOutputVariable) .orElse(""); } MultipleInstanceActivityPropert... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getDataOutput() { return getMultiInstanceLoopCharacteristics() .map(MultiInstanceLoopCharacteristics::getOutputDataItem) .map(MultipleInstanceActivityPropertyReader::createOutputVariable) .orElse(""); } MultipleInstanceActivityPropert... |
@Test public void getGetCompletionCondition() { FormalExpression expression = mock(FormalExpression.class); when(expression.getBody()).thenReturn(EXPRESSION); when(miloop.getCompletionCondition()).thenReturn(expression); assertEquals(EXPRESSION, reader.getCompletionCondition()); } | public String getCompletionCondition() { return getMultiInstanceLoopCharacteristics() .map(miloop -> (FormalExpression) miloop.getCompletionCondition()) .map(FormalExpression::getBody) .orElse(""); } | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCompletionCondition() { return getMultiInstanceLoopCharacteristics() .map(miloop -> (FormalExpression) miloop.getCompletionCondition()) .map(FormalExpression::getBody) .orElse(""); } } | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCompletionCondition() { return getMultiInstanceLoopCharacteristics() .map(miloop -> (FormalExpression) miloop.getCompletionCondition()) .map(FormalExpression::getBody) .orElse(""); } MultipleInstanceActivityPropertyReader(Activity ... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCompletionCondition() { return getMultiInstanceLoopCharacteristics() .map(miloop -> (FormalExpression) miloop.getCompletionCondition()) .map(FormalExpression::getBody) .orElse(""); } MultipleInstanceActivityPropertyReader(Activity ... | MultipleInstanceActivityPropertyReader extends ActivityPropertyReader { public String getCompletionCondition() { return getMultiInstanceLoopCharacteristics() .map(miloop -> (FormalExpression) miloop.getCompletionCondition()) .map(FormalExpression::getBody) .orElse(""); } MultipleInstanceActivityPropertyReader(Activity ... |
@Test public void getGenericServiceTask() { GenericServiceTaskValue task = reader.getGenericServiceTask(); assertEquals("Java", task.getServiceImplementation()); assertEquals("serviceOperation", task.getServiceOperation()); assertEquals("serviceInterface", task.getServiceInterface()); assertEquals("inMessageStructure",... | public GenericServiceTaskValue getGenericServiceTask() { GenericServiceTaskValue value = new GenericServiceTaskValue(); final String implementation = Optional.ofNullable(CustomAttribute.serviceImplementation.of(task).get()) .filter(StringUtils::nonEmpty) .orElseGet(() -> task.getImplementation()); value.setServiceImple... | GenericServiceTaskPropertyReader extends MultipleInstanceActivityPropertyReader { public GenericServiceTaskValue getGenericServiceTask() { GenericServiceTaskValue value = new GenericServiceTaskValue(); final String implementation = Optional.ofNullable(CustomAttribute.serviceImplementation.of(task).get()) .filter(String... | GenericServiceTaskPropertyReader extends MultipleInstanceActivityPropertyReader { public GenericServiceTaskValue getGenericServiceTask() { GenericServiceTaskValue value = new GenericServiceTaskValue(); final String implementation = Optional.ofNullable(CustomAttribute.serviceImplementation.of(task).get()) .filter(String... | GenericServiceTaskPropertyReader extends MultipleInstanceActivityPropertyReader { public GenericServiceTaskValue getGenericServiceTask() { GenericServiceTaskValue value = new GenericServiceTaskValue(); final String implementation = Optional.ofNullable(CustomAttribute.serviceImplementation.of(task).get()) .filter(String... | GenericServiceTaskPropertyReader extends MultipleInstanceActivityPropertyReader { public GenericServiceTaskValue getGenericServiceTask() { GenericServiceTaskValue value = new GenericServiceTaskValue(); final String implementation = Optional.ofNullable(CustomAttribute.serviceImplementation.of(task).get()) .filter(String... |
@Test public void getProcessVariables() { String result = ProcessVariableReader.getProcessVariables(properties); assertEquals("PV1:Boolean:<![CDATA[internal;input;customTag]]>,PV2::[],PV3::[]", result); } | static String getProcessVariables(List<Property> properties) { return properties .stream() .filter(ProcessVariableReader::isProcessVariable) .map(ProcessVariableReader::toProcessVariableString) .collect(Collectors.joining(",")); } | ProcessVariableReader { static String getProcessVariables(List<Property> properties) { return properties .stream() .filter(ProcessVariableReader::isProcessVariable) .map(ProcessVariableReader::toProcessVariableString) .collect(Collectors.joining(",")); } } | ProcessVariableReader { static String getProcessVariables(List<Property> properties) { return properties .stream() .filter(ProcessVariableReader::isProcessVariable) .map(ProcessVariableReader::toProcessVariableString) .collect(Collectors.joining(",")); } } | ProcessVariableReader { static String getProcessVariables(List<Property> properties) { return properties .stream() .filter(ProcessVariableReader::isProcessVariable) .map(ProcessVariableReader::toProcessVariableString) .collect(Collectors.joining(",")); } static String getProcessVariableName(Property p); static boolean... | ProcessVariableReader { static String getProcessVariables(List<Property> properties) { return properties .stream() .filter(ProcessVariableReader::isProcessVariable) .map(ProcessVariableReader::toProcessVariableString) .collect(Collectors.joining(",")); } static String getProcessVariableName(Property p); static boolean... |
@Test public void testLoadModelComponents() { final String dmnModelName = "ModelName"; final DRGElement drgElement1 = mock(DRGElement.class); final DRGElement drgElement2 = mock(DRGElement.class); final DecisionComponent decisionComponent1 = mock(DecisionComponent.class); final DecisionComponent decisionComponent2 = mo... | void loadModelComponents() { final String dmnModelName = dmnGraphUtils.getModelDefinitions().getName().getValue(); final List<DRGElement> dmnModelDRGElements = dmnDiagramsSession.getModelDRGElements(); getModelDRGElements().clear(); dmnModelDRGElements.forEach(drgElement -> { getModelDRGElements().add(makeDecisionCompo... | DecisionComponents { void loadModelComponents() { final String dmnModelName = dmnGraphUtils.getModelDefinitions().getName().getValue(); final List<DRGElement> dmnModelDRGElements = dmnDiagramsSession.getModelDRGElements(); getModelDRGElements().clear(); dmnModelDRGElements.forEach(drgElement -> { getModelDRGElements().... | DecisionComponents { void loadModelComponents() { final String dmnModelName = dmnGraphUtils.getModelDefinitions().getName().getValue(); final List<DRGElement> dmnModelDRGElements = dmnDiagramsSession.getModelDRGElements(); getModelDRGElements().clear(); dmnModelDRGElements.forEach(drgElement -> { getModelDRGElements().... | DecisionComponents { void loadModelComponents() { final String dmnModelName = dmnGraphUtils.getModelDefinitions().getName().getValue(); final List<DRGElement> dmnModelDRGElements = dmnDiagramsSession.getModelDRGElements(); getModelDRGElements().clear(); dmnModelDRGElements.forEach(drgElement -> { getModelDRGElements().... | DecisionComponents { void loadModelComponents() { final String dmnModelName = dmnGraphUtils.getModelDefinitions().getName().getValue(); final List<DRGElement> dmnModelDRGElements = dmnDiagramsSession.getModelDRGElements(); getModelDRGElements().clear(); dmnModelDRGElements.forEach(drgElement -> { getModelDRGElements().... |
@Test public void getProcessVariableName() { assertEquals("PV1", ProcessVariableReader.getProcessVariableName(property1)); assertEquals("PV2", ProcessVariableReader.getProcessVariableName(property2)); assertEquals("PV3", ProcessVariableReader.getProcessVariableName(property3)); assertEquals("caseFile_CV4", ProcessVaria... | public static String getProcessVariableName(Property p) { String name = p.getName(); return name == null || name.isEmpty() ? p.getId() : name; } | ProcessVariableReader { public static String getProcessVariableName(Property p) { String name = p.getName(); return name == null || name.isEmpty() ? p.getId() : name; } } | ProcessVariableReader { public static String getProcessVariableName(Property p) { String name = p.getName(); return name == null || name.isEmpty() ? p.getId() : name; } } | ProcessVariableReader { public static String getProcessVariableName(Property p) { String name = p.getName(); return name == null || name.isEmpty() ? p.getId() : name; } static String getProcessVariableName(Property p); static boolean isProcessVariable(Property p); } | ProcessVariableReader { public static String getProcessVariableName(Property p) { String name = p.getName(); return name == null || name.isEmpty() ? p.getId() : name; } static String getProcessVariableName(Property p); static boolean isProcessVariable(Property p); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.