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 isProcessVariable() { assertTrue(ProcessVariableReader.isProcessVariable(property1)); assertTrue(ProcessVariableReader.isProcessVariable(property2)); assertTrue(ProcessVariableReader.isProcessVariable(property3)); assertFalse(ProcessVariableReader.isProcessVariable(property4)); assertFalse(ProcessVari... | public static boolean isProcessVariable(Property p) { return !CaseFileVariableReader.isCaseFileVariable(p); } | ProcessVariableReader { public static boolean isProcessVariable(Property p) { return !CaseFileVariableReader.isCaseFileVariable(p); } } | ProcessVariableReader { public static boolean isProcessVariable(Property p) { return !CaseFileVariableReader.isCaseFileVariable(p); } } | ProcessVariableReader { public static boolean isProcessVariable(Property p) { return !CaseFileVariableReader.isCaseFileVariable(p); } static String getProcessVariableName(Property p); static boolean isProcessVariable(Property p); } | ProcessVariableReader { public static boolean isProcessVariable(Property p) { return !CaseFileVariableReader.isCaseFileVariable(p); } static String getProcessVariableName(Property p); static boolean isProcessVariable(Property p); } |
@Test public void testBounds() { Bounds bounds = tested.getBounds(); assertTrue(bounds.hasLowerRight()); assertTrue(bounds.hasUpperLeft()); assertEquals(0.7150000154972077d, bounds.getUpperLeft().getX(), 0d); assertEquals(1.4300000309944154d, bounds.getUpperLeft().getY(), 0d); assertEquals(65.71500001549721d, bounds.ge... | @Override public Bounds getBounds() { if (shape == null) { return Bounds.create(); } return computeBounds(shape.getBounds()); } | BasePropertyReader implements PropertyReader { @Override public Bounds getBounds() { if (shape == null) { return Bounds.create(); } return computeBounds(shape.getBounds()); } } | BasePropertyReader implements PropertyReader { @Override public Bounds getBounds() { if (shape == null) { return Bounds.create(); } return computeBounds(shape.getBounds()); } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNSh... | BasePropertyReader implements PropertyReader { @Override public Bounds getBounds() { if (shape == null) { return Bounds.create(); } return computeBounds(shape.getBounds()); } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNSh... | BasePropertyReader implements PropertyReader { @Override public Bounds getBounds() { if (shape == null) { return Bounds.create(); } return computeBounds(shape.getBounds()); } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNSh... |
@Test public void testGetCircleDimensionSet() { CircleDimensionSet circleDimensionSet = tested.getCircleDimensionSet(); assertEquals(32.5d, circleDimensionSet.getRadius().getValue(), 0d); } | @Override public CircleDimensionSet getCircleDimensionSet() { if (shape == null) { return new CircleDimensionSet(); } return new CircleDimensionSet(new Radius( shape.getBounds().getWidth() * resolutionFactor / 2d)); } | BasePropertyReader implements PropertyReader { @Override public CircleDimensionSet getCircleDimensionSet() { if (shape == null) { return new CircleDimensionSet(); } return new CircleDimensionSet(new Radius( shape.getBounds().getWidth() * resolutionFactor / 2d)); } } | BasePropertyReader implements PropertyReader { @Override public CircleDimensionSet getCircleDimensionSet() { if (shape == null) { return new CircleDimensionSet(); } return new CircleDimensionSet(new Radius( shape.getBounds().getWidth() * resolutionFactor / 2d)); } BasePropertyReader(final BaseElement element,
... | BasePropertyReader implements PropertyReader { @Override public CircleDimensionSet getCircleDimensionSet() { if (shape == null) { return new CircleDimensionSet(); } return new CircleDimensionSet(new Radius( shape.getBounds().getWidth() * resolutionFactor / 2d)); } BasePropertyReader(final BaseElement element,
... | BasePropertyReader implements PropertyReader { @Override public CircleDimensionSet getCircleDimensionSet() { if (shape == null) { return new CircleDimensionSet(); } return new CircleDimensionSet(new Radius( shape.getBounds().getWidth() * resolutionFactor / 2d)); } BasePropertyReader(final BaseElement element,
... |
@Test public void testGetRectangleDimensionsSet() { RectangleDimensionsSet rectangleDimensionsSet = tested.getRectangleDimensionsSet(); assertEquals(65.0d, rectangleDimensionsSet.getWidth().getValue(), 0d); assertEquals(354.4710174560547d, rectangleDimensionsSet.getHeight().getValue(), 0d); } | @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null) { return new RectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(bounds.getWidth() * resolutionFactor, bounds.getHeight() * resolutionFactor); } | BasePropertyReader implements PropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null) { return new RectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(bounds.getWidth() * resolutionFactor, bounds.getHeight()... | BasePropertyReader implements PropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null) { return new RectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(bounds.getWidth() * resolutionFactor, bounds.getHeight()... | BasePropertyReader implements PropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null) { return new RectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(bounds.getWidth() * resolutionFactor, bounds.getHeight()... | BasePropertyReader implements PropertyReader { @Override public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null) { return new RectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(bounds.getWidth() * resolutionFactor, bounds.getHeight()... |
@Test public void testIsExpandedTrue() { when(shape.isIsExpanded()).thenReturn(true); assertTrue(tested.isExpanded()); } | @Override public boolean isExpanded() { return shape.isIsExpanded(); } | BasePropertyReader implements PropertyReader { @Override public boolean isExpanded() { return shape.isIsExpanded(); } } | BasePropertyReader implements PropertyReader { @Override public boolean isExpanded() { return shape.isIsExpanded(); } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNShape shape,
final double res... | BasePropertyReader implements PropertyReader { @Override public boolean isExpanded() { return shape.isIsExpanded(); } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNShape shape,
final double res... | BasePropertyReader implements PropertyReader { @Override public boolean isExpanded() { return shape.isIsExpanded(); } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNShape shape,
final double res... |
@Test public void testGetElement() { assertEquals(element, tested.getElement()); } | @Override public BaseElement getElement() { return element; } | BasePropertyReader implements PropertyReader { @Override public BaseElement getElement() { return element; } } | BasePropertyReader implements PropertyReader { @Override public BaseElement getElement() { return element; } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNShape shape,
final double resolutionFa... | BasePropertyReader implements PropertyReader { @Override public BaseElement getElement() { return element; } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNShape shape,
final double resolutionFa... | BasePropertyReader implements PropertyReader { @Override public BaseElement getElement() { return element; } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNShape shape,
final double resolutionFa... |
@Test public void testGetShape() { assertEquals(shape, tested.getShape()); } | @Override public BPMNShape getShape() { return shape; } | BasePropertyReader implements PropertyReader { @Override public BPMNShape getShape() { return shape; } } | BasePropertyReader implements PropertyReader { @Override public BPMNShape getShape() { return shape; } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNShape shape,
final double resolutionFactor);... | BasePropertyReader implements PropertyReader { @Override public BPMNShape getShape() { return shape; } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNShape shape,
final double resolutionFactor);... | BasePropertyReader implements PropertyReader { @Override public BPMNShape getShape() { return shape; } BasePropertyReader(final BaseElement element,
final BPMNDiagram diagram,
final BPMNShape shape,
final double resolutionFactor);... |
@Test public void testGetSourceId() { assertEquals(SOURCE_ID, propertyReader.getSourceId()); } | @Override public String getSourceId() { return association.getSourceRef().getId(); } | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public String getSourceId() { return association.getSourceRef().getId(); } } | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public String getSourceId() { return association.getSourceRef().getId(); } AssociationPropertyReader(Association association,
BPMNDiagram diagram,
Defi... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public String getSourceId() { return association.getSourceRef().getId(); } AssociationPropertyReader(Association association,
BPMNDiagram diagram,
Defi... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public String getSourceId() { return association.getSourceRef().getId(); } AssociationPropertyReader(Association association,
BPMNDiagram diagram,
Defi... |
@Test public void testGetTargetId() { assertEquals(TARGET_ID, propertyReader.getTargetId()); } | @Override public String getTargetId() { return association.getTargetRef().getId(); } | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public String getTargetId() { return association.getTargetRef().getId(); } } | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public String getTargetId() { return association.getTargetRef().getId(); } AssociationPropertyReader(Association association,
BPMNDiagram diagram,
Defi... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public String getTargetId() { return association.getTargetRef().getId(); } AssociationPropertyReader(Association association,
BPMNDiagram diagram,
Defi... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public String getTargetId() { return association.getTargetRef().getId(); } AssociationPropertyReader(Association association,
BPMNDiagram diagram,
Defi... |
@Test public void testGetDMNIncludedModelsOnlyIncludesDMN() { final ImportDMN dmnImport = new ImportDMN(); final ImportPMML pmmlImport = new ImportPMML(); dmnImport.getName().setValue("dmn"); dmnImport.setImportType(DMNImportTypes.DMN.getDefaultNamespace()); pmmlImport.setImportType(DMNImportTypes.PMML.getDefaultNamesp... | List<DMNIncludedModel> getDMNIncludedModels() { return dmnDiagramsSession .getModelImports() .stream() .filter(anImport -> Objects.equals(DMNImportTypes.DMN, determineImportType(anImport.getImportType()))) .map(this::asDMNIncludedModel) .collect(Collectors.toList()); } | DecisionComponents { List<DMNIncludedModel> getDMNIncludedModels() { return dmnDiagramsSession .getModelImports() .stream() .filter(anImport -> Objects.equals(DMNImportTypes.DMN, determineImportType(anImport.getImportType()))) .map(this::asDMNIncludedModel) .collect(Collectors.toList()); } } | DecisionComponents { List<DMNIncludedModel> getDMNIncludedModels() { return dmnDiagramsSession .getModelImports() .stream() .filter(anImport -> Objects.equals(DMNImportTypes.DMN, determineImportType(anImport.getImportType()))) .map(this::asDMNIncludedModel) .collect(Collectors.toList()); } DecisionComponents(); @Inject... | DecisionComponents { List<DMNIncludedModel> getDMNIncludedModels() { return dmnDiagramsSession .getModelImports() .stream() .filter(anImport -> Objects.equals(DMNImportTypes.DMN, determineImportType(anImport.getImportType()))) .map(this::asDMNIncludedModel) .collect(Collectors.toList()); } DecisionComponents(); @Inject... | DecisionComponents { List<DMNIncludedModel> getDMNIncludedModels() { return dmnDiagramsSession .getModelImports() .stream() .filter(anImport -> Objects.equals(DMNImportTypes.DMN, determineImportType(anImport.getImportType()))) .map(this::asDMNIncludedModel) .collect(Collectors.toList()); } DecisionComponents(); @Inject... |
@Test public void testGetSourceConnection() { mockStatic(PropertyReaderUtils.class); PowerMockito.when(PropertyReaderUtils.getSourcePosition(definitionResolver, ASSOCIATION_ID, SOURCE_ID)).thenReturn(position); boolean arbitraryBoolean = true; PowerMockito.when(PropertyReaderUtils.isAutoConnectionSource(association)).t... | @Override public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePosition.getY()) .setAuto(PropertyReaderUtils.isAutoConnectionSource(element)); } | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePo... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePo... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePo... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePo... |
@Test public void testGetTargetConnection() { mockStatic(PropertyReaderUtils.class); PowerMockito.when(PropertyReaderUtils.getTargetPosition(definitionResolver, ASSOCIATION_ID, TARGET_ID)).thenReturn(position); boolean arbitraryBoolean = true; PowerMockito.when(PropertyReaderUtils.isAutoConnectionSource(association)).t... | @Override public Connection getTargetConnection() { Point2D targetPosition = PropertyReaderUtils.getTargetPosition(definitionResolver, element.getId(), getTargetId()); return MagnetConnection.Builder .at(targetPosition.getX(), targetPosition.getY()) .setAuto(PropertyReaderUtils.isAutoConnectionTarget(element)); } | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getTargetConnection() { Point2D targetPosition = PropertyReaderUtils.getTargetPosition(definitionResolver, element.getId(), getTargetId()); return MagnetConnection.Builder .at(targetPosition.getX(), targetPo... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getTargetConnection() { Point2D targetPosition = PropertyReaderUtils.getTargetPosition(definitionResolver, element.getId(), getTargetId()); return MagnetConnection.Builder .at(targetPosition.getX(), targetPo... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getTargetConnection() { Point2D targetPosition = PropertyReaderUtils.getTargetPosition(definitionResolver, element.getId(), getTargetId()); return MagnetConnection.Builder .at(targetPosition.getX(), targetPo... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getTargetConnection() { Point2D targetPosition = PropertyReaderUtils.getTargetPosition(definitionResolver, element.getId(), getTargetId()); return MagnetConnection.Builder .at(targetPosition.getX(), targetPo... |
@Test public void testGetAssociationByDirection() { final Association association = Bpmn2Factory.eINSTANCE.createAssociation(); association.setAssociationDirection(null); propertyReader = new AssociationPropertyReader(association, bpmnDiagram, definitionResolver); assertEquals(NonDirectionalAssociation.class, propertyR... | public Class<? extends org.kie.workbench.common.stunner.bpmn.definition.Association> getAssociationByDirection() { return Optional.ofNullable(association.getAssociationDirection()) .filter(d -> !AssociationDirection.NONE.equals(d)) .<Class<? extends org.kie.workbench.common.stunner.bpmn.definition.Association>>map(d ->... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { public Class<? extends org.kie.workbench.common.stunner.bpmn.definition.Association> getAssociationByDirection() { return Optional.ofNullable(association.getAssociationDirection()) .filter(d -> !AssociationDirection.NONE.equals(d)) .<C... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { public Class<? extends org.kie.workbench.common.stunner.bpmn.definition.Association> getAssociationByDirection() { return Optional.ofNullable(association.getAssociationDirection()) .filter(d -> !AssociationDirection.NONE.equals(d)) .<C... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { public Class<? extends org.kie.workbench.common.stunner.bpmn.definition.Association> getAssociationByDirection() { return Optional.ofNullable(association.getAssociationDirection()) .filter(d -> !AssociationDirection.NONE.equals(d)) .<C... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { public Class<? extends org.kie.workbench.common.stunner.bpmn.definition.Association> getAssociationByDirection() { return Optional.ofNullable(association.getAssociationDirection()) .filter(d -> !AssociationDirection.NONE.equals(d)) .<C... |
@Test @SuppressWarnings("unchecked") public void testGetControlPoints() { List<Point2D> controlPoints = mock(List.class); mockStatic(PropertyReaderUtils.class); PowerMockito.when(PropertyReaderUtils.getControlPoints(definitionResolver, ASSOCIATION_ID)).thenReturn(controlPoints); assertEquals(controlPoints, propertyRead... | @Override public List<Point2D> getControlPoints() { return PropertyReaderUtils.getControlPoints(definitionResolver, element.getId()); } | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public List<Point2D> getControlPoints() { return PropertyReaderUtils.getControlPoints(definitionResolver, element.getId()); } } | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public List<Point2D> getControlPoints() { return PropertyReaderUtils.getControlPoints(definitionResolver, element.getId()); } AssociationPropertyReader(Association association,
BPMNDiagram... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public List<Point2D> getControlPoints() { return PropertyReaderUtils.getControlPoints(definitionResolver, element.getId()); } AssociationPropertyReader(Association association,
BPMNDiagram... | AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public List<Point2D> getControlPoints() { return PropertyReaderUtils.getControlPoints(definitionResolver, element.getId()); } AssociationPropertyReader(Association association,
BPMNDiagram... |
@Test public void getCaseFileVariables() { String caseFileVariables = CaseFileVariableReader.getCaseFileVariables(properties); assertEquals(caseFileVariables, "CFV1:Boolean,CFV2:Boolean"); } | static String getCaseFileVariables(List<Property> properties) { return properties .stream() .filter(CaseFileVariableReader::isCaseFileVariable) .map(CaseFileVariableReader::toCaseFileVariableString) .collect(Collectors.joining(",")); } | CaseFileVariableReader { static String getCaseFileVariables(List<Property> properties) { return properties .stream() .filter(CaseFileVariableReader::isCaseFileVariable) .map(CaseFileVariableReader::toCaseFileVariableString) .collect(Collectors.joining(",")); } } | CaseFileVariableReader { static String getCaseFileVariables(List<Property> properties) { return properties .stream() .filter(CaseFileVariableReader::isCaseFileVariable) .map(CaseFileVariableReader::toCaseFileVariableString) .collect(Collectors.joining(",")); } } | CaseFileVariableReader { static String getCaseFileVariables(List<Property> properties) { return properties .stream() .filter(CaseFileVariableReader::isCaseFileVariable) .map(CaseFileVariableReader::toCaseFileVariableString) .collect(Collectors.joining(",")); } static boolean isCaseFileVariable(Property p); } | CaseFileVariableReader { static String getCaseFileVariables(List<Property> properties) { return properties .stream() .filter(CaseFileVariableReader::isCaseFileVariable) .map(CaseFileVariableReader::toCaseFileVariableString) .collect(Collectors.joining(",")); } static boolean isCaseFileVariable(Property p); } |
@Test public void isCaseFileVariable() { boolean isCaseFile1 = CaseFileVariableReader.isCaseFileVariable(property1); assertTrue(isCaseFile1); boolean isCaseFile2 = CaseFileVariableReader.isCaseFileVariable(property2); assertTrue(isCaseFile2); boolean isCaseFile3 = CaseFileVariableReader.isCaseFileVariable(property3); a... | public static boolean isCaseFileVariable(Property p) { String name = getCaseFileVariableName(p); return name.startsWith(CaseFileVariables.CASE_FILE_PREFIX); } | CaseFileVariableReader { public static boolean isCaseFileVariable(Property p) { String name = getCaseFileVariableName(p); return name.startsWith(CaseFileVariables.CASE_FILE_PREFIX); } } | CaseFileVariableReader { public static boolean isCaseFileVariable(Property p) { String name = getCaseFileVariableName(p); return name.startsWith(CaseFileVariables.CASE_FILE_PREFIX); } } | CaseFileVariableReader { public static boolean isCaseFileVariable(Property p) { String name = getCaseFileVariableName(p); return name.startsWith(CaseFileVariables.CASE_FILE_PREFIX); } static boolean isCaseFileVariable(Property p); } | CaseFileVariableReader { public static boolean isCaseFileVariable(Property p) { String name = getCaseFileVariableName(p); return name.startsWith(CaseFileVariables.CASE_FILE_PREFIX); } static boolean isCaseFileVariable(Property p); } |
@Test public void JBPM_7447_shouldNotFilterOutDataOutputsWithEmptyType() { DataInput dataInput = bpmn2.createDataInput(); dataInput.setName("InputName"); dataInput.setId("InputID"); DataOutput dataOutput = bpmn2.createDataOutput(); dataOutput.setName("OutputName"); dataOutput.setId("OutputID"); ParsedAssignmentsInfo re... | public static ParsedAssignmentsInfo parsed( List<DataInput> datainput, List<DataInputAssociation> inputAssociations, List<DataOutput> dataoutput, List<DataOutputAssociation> outputAssociations, boolean alternativeEncoding) { DeclarationList inputs = dataInputDeclarations(datainput); DeclarationList outputs = dataOutput... | AssignmentsInfos { public static ParsedAssignmentsInfo parsed( List<DataInput> datainput, List<DataInputAssociation> inputAssociations, List<DataOutput> dataoutput, List<DataOutputAssociation> outputAssociations, boolean alternativeEncoding) { DeclarationList inputs = dataInputDeclarations(datainput); DeclarationList o... | AssignmentsInfos { public static ParsedAssignmentsInfo parsed( List<DataInput> datainput, List<DataInputAssociation> inputAssociations, List<DataOutput> dataoutput, List<DataOutputAssociation> outputAssociations, boolean alternativeEncoding) { DeclarationList inputs = dataInputDeclarations(datainput); DeclarationList o... | AssignmentsInfos { public static ParsedAssignmentsInfo parsed( List<DataInput> datainput, List<DataInputAssociation> inputAssociations, List<DataOutput> dataoutput, List<DataOutputAssociation> outputAssociations, boolean alternativeEncoding) { DeclarationList inputs = dataInputDeclarations(datainput); DeclarationList o... | AssignmentsInfos { public static ParsedAssignmentsInfo parsed( List<DataInput> datainput, List<DataInputAssociation> inputAssociations, List<DataOutput> dataoutput, List<DataOutputAssociation> outputAssociations, boolean alternativeEncoding) { DeclarationList inputs = dataInputDeclarations(datainput); DeclarationList o... |
@Test public void getWSDLImports() { final String LOCATION = "location"; final String NAMESPACE = "namespace"; final int QTY = 10; for (int i = 0; i < QTY; i++) { Import imp = PropertyWriterUtils.toImport(new WSDLImport(LOCATION + i, NAMESPACE + i)); definitions.getImports().add(imp); } List<WSDLImport> wsdlImports = t... | public List<WSDLImport> getWSDLImports() { return definitions.getImports().stream() .map(PropertyReaderUtils::toWSDLImports) .collect(Collectors.toList()); } | DefinitionsPropertyReader extends BasePropertyReader { public List<WSDLImport> getWSDLImports() { return definitions.getImports().stream() .map(PropertyReaderUtils::toWSDLImports) .collect(Collectors.toList()); } } | DefinitionsPropertyReader extends BasePropertyReader { public List<WSDLImport> getWSDLImports() { return definitions.getImports().stream() .map(PropertyReaderUtils::toWSDLImports) .collect(Collectors.toList()); } DefinitionsPropertyReader(Definitions element, BPMNDiagram diagram, BPMNShape shape, double resolutionFacto... | DefinitionsPropertyReader extends BasePropertyReader { public List<WSDLImport> getWSDLImports() { return definitions.getImports().stream() .map(PropertyReaderUtils::toWSDLImports) .collect(Collectors.toList()); } DefinitionsPropertyReader(Definitions element, BPMNDiagram diagram, BPMNShape shape, double resolutionFacto... | DefinitionsPropertyReader extends BasePropertyReader { public List<WSDLImport> getWSDLImports() { return definitions.getImports().stream() .map(PropertyReaderUtils::toWSDLImports) .collect(Collectors.toList()); } DefinitionsPropertyReader(Definitions element, BPMNDiagram diagram, BPMNShape shape, double resolutionFacto... |
@Test public void getDefaultImports() { final String CLASS_NAME = "className"; final int QTY = 10; List<DefaultImport> defaultImports = new ArrayList<>(); for (int i = 0; i < QTY; i++) { defaultImports.add(new DefaultImport(CLASS_NAME + i)); } CustomElement.defaultImports.of(process).set(defaultImports); List<DefaultIm... | public List<DefaultImport> getDefaultImports() { return CustomElement.defaultImports.of(process).get(); } | ProcessPropertyReader extends BasePropertyReader { public List<DefaultImport> getDefaultImports() { return CustomElement.defaultImports.of(process).get(); } } | ProcessPropertyReader extends BasePropertyReader { public List<DefaultImport> getDefaultImports() { return CustomElement.defaultImports.of(process).get(); } ProcessPropertyReader(Process element, BPMNDiagram diagram, BPMNShape shape, double resolutionFactor); } | ProcessPropertyReader extends BasePropertyReader { public List<DefaultImport> getDefaultImports() { return CustomElement.defaultImports.of(process).get(); } ProcessPropertyReader(Process element, BPMNDiagram diagram, BPMNShape shape, double resolutionFactor); String getPackage(); String getProcessType(); String getVers... | ProcessPropertyReader extends BasePropertyReader { public List<DefaultImport> getDefaultImports() { return CustomElement.defaultImports.of(process).get(); } ProcessPropertyReader(Process element, BPMNDiagram diagram, BPMNShape shape, double resolutionFactor); String getPackage(); String getProcessType(); String getVers... |
@Test public void getProcessType() { ProcessPropertyWriter writer = new ProcessPropertyWriter( bpmn2.createProcess(), null, null); writer.setType(ProcessType.PRIVATE.getName()); tested = new ProcessPropertyReader(writer.getProcess(), definitionResolver.getDiagram(), definitionResolver.getShape(process.getId()), definit... | public String getProcessType() { return process.getProcessType().getName(); } | ProcessPropertyReader extends BasePropertyReader { public String getProcessType() { return process.getProcessType().getName(); } } | ProcessPropertyReader extends BasePropertyReader { public String getProcessType() { return process.getProcessType().getName(); } ProcessPropertyReader(Process element, BPMNDiagram diagram, BPMNShape shape, double resolutionFactor); } | ProcessPropertyReader extends BasePropertyReader { public String getProcessType() { return process.getProcessType().getName(); } ProcessPropertyReader(Process element, BPMNDiagram diagram, BPMNShape shape, double resolutionFactor); String getPackage(); String getProcessType(); String getVersion(); boolean isAdHoc(); @O... | ProcessPropertyReader extends BasePropertyReader { public String getProcessType() { return process.getProcessType().getName(); } ProcessPropertyReader(Process element, BPMNDiagram diagram, BPMNShape shape, double resolutionFactor); String getPackage(); String getProcessType(); String getVersion(); boolean isAdHoc(); @O... |
@Test public void testApplyTermFilter() { final String value = "value"; doNothing().when(decisionComponents).applyFilter(); decisionComponents.applyTermFilter(value); verify(filter).setTerm(value); verify(decisionComponents).applyFilter(); } | void applyTermFilter(final String value) { getFilter().setTerm(value); applyFilter(); } | DecisionComponents { void applyTermFilter(final String value) { getFilter().setTerm(value); applyFilter(); } } | DecisionComponents { void applyTermFilter(final String value) { getFilter().setTerm(value); applyFilter(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> i... | DecisionComponents { void applyTermFilter(final String value) { getFilter().setTerm(value); applyFilter(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> i... | DecisionComponents { void applyTermFilter(final String value) { getFilter().setTerm(value); applyFilter(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> i... |
@Test public void testGetScript() { for (Scripts.LANGUAGE language : Scripts.LANGUAGE.values()) { testGetScript(new ScriptTypeValue(language.language(), SCRIPT), language.format(), SCRIPT); } } | public ScriptTypeValue getScript() { return new ScriptTypeValue( Scripts.scriptLanguageFromUri(task.getScriptFormat(), Scripts.LANGUAGE.JAVA.language()), Optional.ofNullable(task.getScript()).orElse(null) ); } | ScriptTaskPropertyReader extends TaskPropertyReader { public ScriptTypeValue getScript() { return new ScriptTypeValue( Scripts.scriptLanguageFromUri(task.getScriptFormat(), Scripts.LANGUAGE.JAVA.language()), Optional.ofNullable(task.getScript()).orElse(null) ); } } | ScriptTaskPropertyReader extends TaskPropertyReader { public ScriptTypeValue getScript() { return new ScriptTypeValue( Scripts.scriptLanguageFromUri(task.getScriptFormat(), Scripts.LANGUAGE.JAVA.language()), Optional.ofNullable(task.getScript()).orElse(null) ); } ScriptTaskPropertyReader(ScriptTask task, BPMNDiagram di... | ScriptTaskPropertyReader extends TaskPropertyReader { public ScriptTypeValue getScript() { return new ScriptTypeValue( Scripts.scriptLanguageFromUri(task.getScriptFormat(), Scripts.LANGUAGE.JAVA.language()), Optional.ofNullable(task.getScript()).orElse(null) ); } ScriptTaskPropertyReader(ScriptTask task, BPMNDiagram di... | ScriptTaskPropertyReader extends TaskPropertyReader { public ScriptTypeValue getScript() { return new ScriptTypeValue( Scripts.scriptLanguageFromUri(task.getScriptFormat(), Scripts.LANGUAGE.JAVA.language()), Optional.ofNullable(task.getScript()).orElse(null) ); } ScriptTaskPropertyReader(ScriptTask task, BPMNDiagram di... |
@Test public void testGetAdHocCompletionConditionWithoutFormalExpression() { when(process.getCompletionCondition()).thenReturn(null); assertEquals(new ScriptTypeValue(Scripts.LANGUAGE.MVEL.language(), "autocomplete"), propertyReader.getAdHocCompletionCondition()); } | public ScriptTypeValue getAdHocCompletionCondition() { if (process.getCompletionCondition() instanceof FormalExpression) { FormalExpression completionCondition = (FormalExpression) process.getCompletionCondition(); return new ScriptTypeValue( Scripts.scriptLanguageFromUri(completionCondition.getLanguage(), Scripts.LANG... | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public ScriptTypeValue getAdHocCompletionCondition() { if (process.getCompletionCondition() instanceof FormalExpression) { FormalExpression completionCondition = (FormalExpression) process.getCompletionCondition(); return new ScriptTypeValue( Scripts.scri... | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public ScriptTypeValue getAdHocCompletionCondition() { if (process.getCompletionCondition() instanceof FormalExpression) { FormalExpression completionCondition = (FormalExpression) process.getCompletionCondition(); return new ScriptTypeValue( Scripts.scri... | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public ScriptTypeValue getAdHocCompletionCondition() { if (process.getCompletionCondition() instanceof FormalExpression) { FormalExpression completionCondition = (FormalExpression) process.getCompletionCondition(); return new ScriptTypeValue( Scripts.scri... | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public ScriptTypeValue getAdHocCompletionCondition() { if (process.getCompletionCondition() instanceof FormalExpression) { FormalExpression completionCondition = (FormalExpression) process.getCompletionCondition(); return new ScriptTypeValue( Scripts.scri... |
@Test public void testIsAdHocAutostart_true() { String id = UUID.randomUUID().toString(); AdHocSubProcess adHocSubProcess = bpmn2.createAdHocSubProcess(); adHocSubProcess.setId(id); CustomElement.autoStart.of(adHocSubProcess).set(Boolean.TRUE); tested = new AdHocSubProcessPropertyReader(adHocSubProcess, definitionResol... | public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } } | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); } | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getAdHocActivationCondition(); ScriptTypeVal... | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getAdHocActivationCondition(); ScriptTypeVal... |
@Test public void testIsAdHocAutostart_false() { String id = UUID.randomUUID().toString(); AdHocSubProcess adHocSubProcess = bpmn2.createAdHocSubProcess(); adHocSubProcess.setId(id); CustomElement.autoStart.of(adHocSubProcess).set(Boolean.FALSE); tested = new AdHocSubProcessPropertyReader(adHocSubProcess, definitionRes... | public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } } | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); } | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getAdHocActivationCondition(); ScriptTypeVal... | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public boolean isAdHocAutostart() { return CustomElement.autoStart.of(element).get(); } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getAdHocActivationCondition(); ScriptTypeVal... |
@Test public void testIsAdHocActivationCondition() { AdHocSubProcess adHocSubProcess = bpmn2.createAdHocSubProcess(); CustomElement.customActivationCondition.of(adHocSubProcess).set("some condition"); tested = new AdHocSubProcessPropertyReader(adHocSubProcess, definitionResolverReal.getDiagram(), definitionResolverReal... | public String getAdHocActivationCondition() { return CustomElement.customActivationCondition.of(element).get(); } | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public String getAdHocActivationCondition() { return CustomElement.customActivationCondition.of(element).get(); } } | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public String getAdHocActivationCondition() { return CustomElement.customActivationCondition.of(element).get(); } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); } | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public String getAdHocActivationCondition() { return CustomElement.customActivationCondition.of(element).get(); } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getAdHocActivation... | AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public String getAdHocActivationCondition() { return CustomElement.customActivationCondition.of(element).get(); } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getAdHocActivation... |
@Test public void testGetOnEntryScript() { OnEntryScriptType onEntryScript = Mockito.mock(OnEntryScriptType.class); when(onEntryScript.getScript()).thenReturn(SCRIPT); when(onEntryScript.getScriptFormat()).thenReturn(JAVA_FORMAT); List<OnEntryScriptType> onEntryScripts = Collections.singletonList(onEntryScript); List<E... | public ScriptTypeListValue getOnEntryAction() { return Scripts.onEntry(element.getExtensionValues()); } | ActivityPropertyReader extends FlowElementPropertyReader { public ScriptTypeListValue getOnEntryAction() { return Scripts.onEntry(element.getExtensionValues()); } } | ActivityPropertyReader extends FlowElementPropertyReader { public ScriptTypeListValue getOnEntryAction() { return Scripts.onEntry(element.getExtensionValues()); } ActivityPropertyReader(Activity activity, BPMNDiagram diagram, DefinitionResolver definitionResolver); } | ActivityPropertyReader extends FlowElementPropertyReader { public ScriptTypeListValue getOnEntryAction() { return Scripts.onEntry(element.getExtensionValues()); } ActivityPropertyReader(Activity activity, BPMNDiagram diagram, DefinitionResolver definitionResolver); ScriptTypeListValue getOnEntryAction(); ScriptTypeList... | ActivityPropertyReader extends FlowElementPropertyReader { public ScriptTypeListValue getOnEntryAction() { return Scripts.onEntry(element.getExtensionValues()); } ActivityPropertyReader(Activity activity, BPMNDiagram diagram, DefinitionResolver definitionResolver); ScriptTypeListValue getOnEntryAction(); ScriptTypeList... |
@Test public void testGetOnExitScript() { OnExitScriptType onExitScript = Mockito.mock(OnExitScriptType.class); when(onExitScript.getScript()).thenReturn(SCRIPT); when(onExitScript.getScriptFormat()).thenReturn(JAVA_FORMAT); List<OnExitScriptType> onExitScripts = Collections.singletonList(onExitScript); List<ExtensionA... | public ScriptTypeListValue getOnExitAction() { return Scripts.onExit(element.getExtensionValues()); } | ActivityPropertyReader extends FlowElementPropertyReader { public ScriptTypeListValue getOnExitAction() { return Scripts.onExit(element.getExtensionValues()); } } | ActivityPropertyReader extends FlowElementPropertyReader { public ScriptTypeListValue getOnExitAction() { return Scripts.onExit(element.getExtensionValues()); } ActivityPropertyReader(Activity activity, BPMNDiagram diagram, DefinitionResolver definitionResolver); } | ActivityPropertyReader extends FlowElementPropertyReader { public ScriptTypeListValue getOnExitAction() { return Scripts.onExit(element.getExtensionValues()); } ActivityPropertyReader(Activity activity, BPMNDiagram diagram, DefinitionResolver definitionResolver); ScriptTypeListValue getOnEntryAction(); ScriptTypeListVa... | ActivityPropertyReader extends FlowElementPropertyReader { public ScriptTypeListValue getOnExitAction() { return Scripts.onExit(element.getExtensionValues()); } ActivityPropertyReader(Activity activity, BPMNDiagram diagram, DefinitionResolver definitionResolver); ScriptTypeListValue getOnEntryAction(); ScriptTypeListVa... |
@Test public void testGetAssignmentsInfo() { List<DataInput> dataInputs = new ArrayList<>(); DataInput dataInput1 = mockDataInput("INPUT_ID_1", "INPUT_NAME_1", mockEntry("dtype", "Integer")); DataInput dataInput2 = mockDataInput("INPUT_ID_2", "INPUT_NAME_2", mockEntry("dtype", "String")); dataInputs.add(dataInput1); da... | public AssignmentsInfo getAssignmentsInfo() { AssignmentsInfo info = AssignmentsInfos.of(getDataInputs(), getDataInputAssociations(), getDataOutputs(), getDataOutputAssociations(), getIOSpecification().isPresent()); if (info.getValue().isEmpty()) { info.setValue(EMPTY_ASSIGNMENTS); } return info; } | ActivityPropertyReader extends FlowElementPropertyReader { public AssignmentsInfo getAssignmentsInfo() { AssignmentsInfo info = AssignmentsInfos.of(getDataInputs(), getDataInputAssociations(), getDataOutputs(), getDataOutputAssociations(), getIOSpecification().isPresent()); if (info.getValue().isEmpty()) { info.setValu... | ActivityPropertyReader extends FlowElementPropertyReader { public AssignmentsInfo getAssignmentsInfo() { AssignmentsInfo info = AssignmentsInfos.of(getDataInputs(), getDataInputAssociations(), getDataOutputs(), getDataOutputAssociations(), getIOSpecification().isPresent()); if (info.getValue().isEmpty()) { info.setValu... | ActivityPropertyReader extends FlowElementPropertyReader { public AssignmentsInfo getAssignmentsInfo() { AssignmentsInfo info = AssignmentsInfos.of(getDataInputs(), getDataInputAssociations(), getDataOutputs(), getDataOutputAssociations(), getIOSpecification().isPresent()); if (info.getValue().isEmpty()) { info.setValu... | ActivityPropertyReader extends FlowElementPropertyReader { public AssignmentsInfo getAssignmentsInfo() { AssignmentsInfo info = AssignmentsInfos.of(getDataInputs(), getDataInputAssociations(), getDataOutputs(), getDataOutputAssociations(), getIOSpecification().isPresent()); if (info.getValue().isEmpty()) { info.setValu... |
@Test public void convertBusinessRuleTask() { org.eclipse.bpmn2.BusinessRuleTask task = mock(org.eclipse.bpmn2.BusinessRuleTask.class); BusinessRuleTaskPropertyReader propertyReader = mock(BusinessRuleTaskPropertyReader.class); BusinessRuleTask businessRuleDefinition = new BusinessRuleTask(); when(factoryManager.newNod... | @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::scriptTask) .when(org.eclipse.bpmn2.UserTask.class, this::userTask) .when(org.eclip... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... |
@Test public void convertServiceTask() { org.eclipse.bpmn2.ServiceTask task = mock(org.eclipse.bpmn2.ServiceTask.class); ServiceTaskPropertyReader serviceTaskPropertyReader = mock(ServiceTaskPropertyReader.class); CustomTask definition = new CustomTask(); FeatureMap attributes = mock(FeatureMap.class); FeatureMap.Entry... | @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::scriptTask) .when(org.eclipse.bpmn2.UserTask.class, this::userTask) .when(org.eclip... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... |
@Test public void testApplyDrgElementFilterFilter() { final String value = "value"; doNothing().when(decisionComponents).applyFilter(); decisionComponents.applyDrgElementFilterFilter(value); verify(filter).setDrgElement(value); verify(decisionComponents).applyFilter(); } | void applyDrgElementFilterFilter(final String value) { getFilter().setDrgElement(value); applyFilter(); } | DecisionComponents { void applyDrgElementFilterFilter(final String value) { getFilter().setDrgElement(value); applyFilter(); } } | DecisionComponents { void applyDrgElementFilterFilter(final String value) { getFilter().setDrgElement(value); applyFilter(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<Decisio... | DecisionComponents { void applyDrgElementFilterFilter(final String value) { getFilter().setDrgElement(value); applyFilter(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<Decisio... | DecisionComponents { void applyDrgElementFilterFilter(final String value) { getFilter().setDrgElement(value); applyFilter(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<Decisio... |
@Test public void convertGenericServiceTask() { org.eclipse.bpmn2.ServiceTask task = mock(org.eclipse.bpmn2.ServiceTask.class); GenericServiceTaskPropertyReader genericServiceTaskPropertyReader = mock(GenericServiceTaskPropertyReader.class); GenericServiceTask definition = new GenericServiceTask(); FeatureMap attribute... | @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::scriptTask) .when(org.eclipse.bpmn2.UserTask.class, this::userTask) .when(org.eclip... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... | BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> { @Override public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) { return Match.of(Task.class, BpmnNode.class) .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask) .when(org.eclipse.bpmn2.ScriptTask.class, this::script... |
@Test public void testConvertEdge() { associationConverter.convertEdge(association, nodes); verify(definition).setGeneral(generalSetCaptor.capture()); assertEquals(ASSOCIATION_DOCUMENTATION, generalSetCaptor.getValue().getDocumentation().getValue()); assertEdgeWithConnections(); } | public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(association.getId(), p.getAssociationByDirection()); Association definition = edg... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... |
@Test public void testConvertEdgeNonDirectional() { when(factoryManager.newEdge(ASSOCIATION_ID, NonDirectionalAssociation.class)).thenReturn((Edge) edgeNonDirectional); when(associationReader.getAssociationByDirection()).thenAnswer(a -> NonDirectionalAssociation.class); when(edgeNonDirectional.getContent()).thenReturn(... | public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(association.getId(), p.getAssociationByDirection()); Association definition = edg... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... |
@Test public void testConvertIgnoredEdge() { assertEdgeWithConnections(); nodes.remove(SOURCE_ID); BpmnEdge.Simple result = (BpmnEdge.Simple) associationConverter.convertEdge(association, nodes).value(); assertNull(result); nodes.put(SOURCE_ID, sourceNode); nodes.remove(TARGET_ID); result = (BpmnEdge.Simple) associatio... | public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(association.getId(), p.getAssociationByDirection()); Association definition = edg... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... | AssociationConverter implements EdgeConverter<org.eclipse.bpmn2.Association> { public Result<BpmnEdge> convertEdge(org.eclipse.bpmn2.Association association, Map<String, BpmnNode> nodes) { AssociationPropertyReader p = propertyReaderFactory.of(association); Edge<View<Association>, Node> edge = factoryManager.newEdge(as... |
@Test public void testPostConvert() { DefinitionResolver definitionResolver = mock(DefinitionResolver.class); double laneX = 80; double laneY = 100; double laneWidth = 500; double laneHeight = 200; RectangleDimensionsSet laneRectangleDimensionsSet = new RectangleDimensionsSet(laneWidth, laneHeight); Lane laneDefinition... | public Result<BpmnNode> postConvert(BpmnNode rootNode, DefinitionResolver definitionResolver) { if (definitionResolver.getResolutionFactor() != 1) { context = PostConverterContext.of(rootNode, definitionResolver.isJbpm()); adjustAllEdgeConnections(rootNode, true); if (context.hasCollapsedNodes()) { List<LaneInfo> laneI... | ProcessPostConverter { public Result<BpmnNode> postConvert(BpmnNode rootNode, DefinitionResolver definitionResolver) { if (definitionResolver.getResolutionFactor() != 1) { context = PostConverterContext.of(rootNode, definitionResolver.isJbpm()); adjustAllEdgeConnections(rootNode, true); if (context.hasCollapsedNodes())... | ProcessPostConverter { public Result<BpmnNode> postConvert(BpmnNode rootNode, DefinitionResolver definitionResolver) { if (definitionResolver.getResolutionFactor() != 1) { context = PostConverterContext.of(rootNode, definitionResolver.isJbpm()); adjustAllEdgeConnections(rootNode, true); if (context.hasCollapsedNodes())... | ProcessPostConverter { public Result<BpmnNode> postConvert(BpmnNode rootNode, DefinitionResolver definitionResolver) { if (definitionResolver.getResolutionFactor() != 1) { context = PostConverterContext.of(rootNode, definitionResolver.isJbpm()); adjustAllEdgeConnections(rootNode, true); if (context.hasCollapsedNodes())... | ProcessPostConverter { public Result<BpmnNode> postConvert(BpmnNode rootNode, DefinitionResolver definitionResolver) { if (definitionResolver.getResolutionFactor() != 1) { context = PostConverterContext.of(rootNode, definitionResolver.isJbpm()); adjustAllEdgeConnections(rootNode, true); if (context.hasCollapsedNodes())... |
@Test public void testBoundsCalculation() { double subprocess1X = 10; double subprocess1Y = 10; double subprocess1Width = 100; double subprocess1Height = 200; EmbeddedSubprocess subprocess1Definition = mock(EmbeddedSubprocess.class); Node<? extends View<? extends BPMNViewDefinition>, ?> subprocess1 = mockNode(subproces... | public void buildGraph(BpmnNode rootNode) { this.addNode(rootNode.value()); rootNode.getEdges().forEach(this::addEdge); List<BpmnNode> nodes = rootNode.getChildren(); Deque<BpmnNode> workingSet = new ArrayDeque<>(prioritized(nodes)); Set<BpmnNode> workedOff = new HashSet<>(); while (!workingSet.isEmpty()) { BpmnNode cu... | GraphBuilder { public void buildGraph(BpmnNode rootNode) { this.addNode(rootNode.value()); rootNode.getEdges().forEach(this::addEdge); List<BpmnNode> nodes = rootNode.getChildren(); Deque<BpmnNode> workingSet = new ArrayDeque<>(prioritized(nodes)); Set<BpmnNode> workedOff = new HashSet<>(); while (!workingSet.isEmpty()... | GraphBuilder { public void buildGraph(BpmnNode rootNode) { this.addNode(rootNode.value()); rootNode.getEdges().forEach(this::addEdge); List<BpmnNode> nodes = rootNode.getChildren(); Deque<BpmnNode> workingSet = new ArrayDeque<>(prioritized(nodes)); Set<BpmnNode> workedOff = new HashSet<>(); while (!workingSet.isEmpty()... | GraphBuilder { public void buildGraph(BpmnNode rootNode) { this.addNode(rootNode.value()); rootNode.getEdges().forEach(this::addEdge); List<BpmnNode> nodes = rootNode.getChildren(); Deque<BpmnNode> workingSet = new ArrayDeque<>(prioritized(nodes)); Set<BpmnNode> workedOff = new HashSet<>(); while (!workingSet.isEmpty()... | GraphBuilder { public void buildGraph(BpmnNode rootNode) { this.addNode(rootNode.value()); rootNode.getEdges().forEach(this::addEdge); List<BpmnNode> nodes = rootNode.getChildren(); Deque<BpmnNode> workingSet = new ArrayDeque<>(prioritized(nodes)); Set<BpmnNode> workedOff = new HashSet<>(); while (!workingSet.isEmpty()... |
@Test public void testObtainResolutionFactor() { double factor = DefinitionResolver.obtainResolutionFactor(); assertEquals(DefinitionResolver.DEFAULT_RESOLUTION, factor, 0d); System.setProperty(DefinitionResolver.BPMN_DIAGRAM_RESOLUTION_PROPERTY, "0.25"); factor = DefinitionResolver.obtainResolutionFactor(); assertEqua... | static double obtainResolutionFactor() { final String resolution = System.getProperty(BPMN_DIAGRAM_RESOLUTION_PROPERTY); if (null != resolution && resolution.trim().length() > 0) { try { return Double.parseDouble(resolution); } catch (NumberFormatException e) { LOG.error("Error parsing the BPMN diagram's resolution - m... | DefinitionResolver { static double obtainResolutionFactor() { final String resolution = System.getProperty(BPMN_DIAGRAM_RESOLUTION_PROPERTY); if (null != resolution && resolution.trim().length() > 0) { try { return Double.parseDouble(resolution); } catch (NumberFormatException e) { LOG.error("Error parsing the BPMN dia... | DefinitionResolver { static double obtainResolutionFactor() { final String resolution = System.getProperty(BPMN_DIAGRAM_RESOLUTION_PROPERTY); if (null != resolution && resolution.trim().length() > 0) { try { return Double.parseDouble(resolution); } catch (NumberFormatException e) { LOG.error("Error parsing the BPMN dia... | DefinitionResolver { static double obtainResolutionFactor() { final String resolution = System.getProperty(BPMN_DIAGRAM_RESOLUTION_PROPERTY); if (null != resolution && resolution.trim().length() > 0) { try { return Double.parseDouble(resolution); } catch (NumberFormatException e) { LOG.error("Error parsing the BPMN dia... | DefinitionResolver { static double obtainResolutionFactor() { final String resolution = System.getProperty(BPMN_DIAGRAM_RESOLUTION_PROPERTY); if (null != resolution && resolution.trim().length() > 0) { try { return Double.parseDouble(resolution); } catch (NumberFormatException e) { LOG.error("Error parsing the BPMN dia... |
@Test public void testCalculateResolutionFactor() { BPMNDiagram diagram = mock(BPMNDiagram.class); when(diagram.getResolution()).thenReturn(0f); double factor = DefinitionResolver.calculateResolutionFactor(diagram); assertEquals(1d, factor, 0d); when(diagram.getResolution()).thenReturn(250f); factor = DefinitionResolve... | static double calculateResolutionFactor(final BPMNDiagram diagram) { final float resolution = diagram.getResolution(); return resolution == 0 ? 1 : obtainResolutionFactor() / resolution; } | DefinitionResolver { static double calculateResolutionFactor(final BPMNDiagram diagram) { final float resolution = diagram.getResolution(); return resolution == 0 ? 1 : obtainResolutionFactor() / resolution; } } | DefinitionResolver { static double calculateResolutionFactor(final BPMNDiagram diagram) { final float resolution = diagram.getResolution(); return resolution == 0 ? 1 : obtainResolutionFactor() / resolution; } DefinitionResolver(
Definitions definitions,
Collection<WorkItemDefinition> workItemDe... | DefinitionResolver { static double calculateResolutionFactor(final BPMNDiagram diagram) { final float resolution = diagram.getResolution(); return resolution == 0 ? 1 : obtainResolutionFactor() / resolution; } DefinitionResolver(
Definitions definitions,
Collection<WorkItemDefinition> workItemDe... | DefinitionResolver { static double calculateResolutionFactor(final BPMNDiagram diagram) { final float resolution = diagram.getResolution(); return resolution == 0 ? 1 : obtainResolutionFactor() / resolution; } DefinitionResolver(
Definitions definitions,
Collection<WorkItemDefinition> workItemDe... |
@Test public void testGetShape() { BPMNShape shape = mock(BPMNShape.class); BaseElement bpmnElement = mock(BaseElement.class); when(shape.getBpmnElement()).thenReturn(bpmnElement); when(bpmnElement.getId()).thenReturn(ID); planeElement.add(shape); assertEquals(shape, definitionResolver.getShape(ID)); } | public BPMNShape getShape(String elementId) { return definitions.getDiagrams().stream() .map(BPMNDiagram::getPlane) .map(plane -> getShape(plane, elementId)) .filter(Objects::nonNull) .findFirst().orElse(null); } | DefinitionResolver { public BPMNShape getShape(String elementId) { return definitions.getDiagrams().stream() .map(BPMNDiagram::getPlane) .map(plane -> getShape(plane, elementId)) .filter(Objects::nonNull) .findFirst().orElse(null); } } | DefinitionResolver { public BPMNShape getShape(String elementId) { return definitions.getDiagrams().stream() .map(BPMNDiagram::getPlane) .map(plane -> getShape(plane, elementId)) .filter(Objects::nonNull) .findFirst().orElse(null); } DefinitionResolver(
Definitions definitions,
Collection<WorkIt... | DefinitionResolver { public BPMNShape getShape(String elementId) { return definitions.getDiagrams().stream() .map(BPMNDiagram::getPlane) .map(plane -> getShape(plane, elementId)) .filter(Objects::nonNull) .findFirst().orElse(null); } DefinitionResolver(
Definitions definitions,
Collection<WorkIt... | DefinitionResolver { public BPMNShape getShape(String elementId) { return definitions.getDiagrams().stream() .map(BPMNDiagram::getPlane) .map(plane -> getShape(plane, elementId)) .filter(Objects::nonNull) .findFirst().orElse(null); } DefinitionResolver(
Definitions definitions,
Collection<WorkIt... |
@Test public void testGetEdge() { BPMNEdge edge = mock(BPMNEdge.class); BaseElement bpmnElement = mock(BaseElement.class); when(edge.getBpmnElement()).thenReturn(bpmnElement); when(bpmnElement.getId()).thenReturn(ID); planeElement.add(edge); assertEquals(edge, definitionResolver.getEdge(ID)); } | public BPMNEdge getEdge(String elementId) { return definitions.getDiagrams().stream() .map(BPMNDiagram::getPlane) .map(plane -> getEdge(plane, elementId)) .filter(Objects::nonNull) .findFirst().orElse(null); } | DefinitionResolver { public BPMNEdge getEdge(String elementId) { return definitions.getDiagrams().stream() .map(BPMNDiagram::getPlane) .map(plane -> getEdge(plane, elementId)) .filter(Objects::nonNull) .findFirst().orElse(null); } } | DefinitionResolver { public BPMNEdge getEdge(String elementId) { return definitions.getDiagrams().stream() .map(BPMNDiagram::getPlane) .map(plane -> getEdge(plane, elementId)) .filter(Objects::nonNull) .findFirst().orElse(null); } DefinitionResolver(
Definitions definitions,
Collection<WorkItemD... | DefinitionResolver { public BPMNEdge getEdge(String elementId) { return definitions.getDiagrams().stream() .map(BPMNDiagram::getPlane) .map(plane -> getEdge(plane, elementId)) .filter(Objects::nonNull) .findFirst().orElse(null); } DefinitionResolver(
Definitions definitions,
Collection<WorkItemD... | DefinitionResolver { public BPMNEdge getEdge(String elementId) { return definitions.getDiagrams().stream() .map(BPMNDiagram::getPlane) .map(plane -> getEdge(plane, elementId)) .filter(Objects::nonNull) .findFirst().orElse(null); } DefinitionResolver(
Definitions definitions,
Collection<WorkItemD... |
@Test public void testApplyFilter() { final DecisionComponentsItem item1 = mock(DecisionComponentsItem.class); final DecisionComponentsItem item2 = mock(DecisionComponentsItem.class); final DecisionComponentsItem item3 = mock(DecisionComponentsItem.class); final DecisionComponent component1 = mock(DecisionComponent.cla... | void applyFilter() { hideAllItems(); showFilteredItems(); } | DecisionComponents { void applyFilter() { hideAllItems(); showFilteredItems(); } } | DecisionComponents { void applyFilter() { hideAllItems(); showFilteredItems(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... | DecisionComponents { void applyFilter() { hideAllItems(); showFilteredItems(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... | DecisionComponents { void applyFilter() { hideAllItems(); showFilteredItems(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... |
@Test public void testSimulation() { String elementRef = "some_element_ref"; EList<Scenario> scenarios = mock(EList.class); Scenario scenario = mock(Scenario.class); when(scenarios.get(0)).thenReturn(scenario); EList<ElementParameters> parameters = mock(EList.class); ElementParameters parameter = mock(ElementParameters... | public Optional<ElementParameters> resolveSimulationParameters(String id) { return Optional.ofNullable(simulationParameters.get(id)); } | DefinitionResolver { public Optional<ElementParameters> resolveSimulationParameters(String id) { return Optional.ofNullable(simulationParameters.get(id)); } } | DefinitionResolver { public Optional<ElementParameters> resolveSimulationParameters(String id) { return Optional.ofNullable(simulationParameters.get(id)); } DefinitionResolver(
Definitions definitions,
Collection<WorkItemDefinition> workItemDefinitions,
boolean jbpm,
Mode... | DefinitionResolver { public Optional<ElementParameters> resolveSimulationParameters(String id) { return Optional.ofNullable(simulationParameters.get(id)); } DefinitionResolver(
Definitions definitions,
Collection<WorkItemDefinition> workItemDefinitions,
boolean jbpm,
Mode... | DefinitionResolver { public Optional<ElementParameters> resolveSimulationParameters(String id) { return Optional.ofNullable(simulationParameters.get(id)); } DefinitionResolver(
Definitions definitions,
Collection<WorkItemDefinition> workItemDefinitions,
boolean jbpm,
Mode... |
@Test public void convertEdge() { Map<String, BpmnNode> nodes = new Maps.Builder<String, BpmnNode>() .put(PARENT_ID, node1) .put(CHILD_ID, node2) .build(); Result<BpmnEdge> result = tested.convertEdge(event, nodes); BpmnEdge value = result.value(); assertTrue(result.isSuccess()); assertEquals(node1, value.getSource());... | @Override public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) { String parentId = event.getAttachedToRef().getId(); String childId = event.getId(); return valid(nodes, parentId, childId) ? Result.success(BpmnEdge.docked(nodes.get(parentId), nodes.get(childId))) : Result.ignored("Bounda... | BoundaryEventConverter implements EdgeConverter<BoundaryEvent> { @Override public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) { String parentId = event.getAttachedToRef().getId(); String childId = event.getId(); return valid(nodes, parentId, childId) ? Result.success(BpmnEdge.docked(n... | BoundaryEventConverter implements EdgeConverter<BoundaryEvent> { @Override public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) { String parentId = event.getAttachedToRef().getId(); String childId = event.getId(); return valid(nodes, parentId, childId) ? Result.success(BpmnEdge.docked(n... | BoundaryEventConverter implements EdgeConverter<BoundaryEvent> { @Override public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) { String parentId = event.getAttachedToRef().getId(); String childId = event.getId(); return valid(nodes, parentId, childId) ? Result.success(BpmnEdge.docked(n... | BoundaryEventConverter implements EdgeConverter<BoundaryEvent> { @Override public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) { String parentId = event.getAttachedToRef().getId(); String childId = event.getId(); return valid(nodes, parentId, childId) ? Result.success(BpmnEdge.docked(n... |
@Test public void convertMissingNodes() { Map<String, BpmnNode> nodes = new HashMap<>(); Result<BpmnEdge> result = tested.convertEdge(event, nodes); BpmnEdge value = result.value(); assertTrue(result.isIgnored()); assertNull(value); } | @Override public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) { String parentId = event.getAttachedToRef().getId(); String childId = event.getId(); return valid(nodes, parentId, childId) ? Result.success(BpmnEdge.docked(nodes.get(parentId), nodes.get(childId))) : Result.ignored("Bounda... | BoundaryEventConverter implements EdgeConverter<BoundaryEvent> { @Override public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) { String parentId = event.getAttachedToRef().getId(); String childId = event.getId(); return valid(nodes, parentId, childId) ? Result.success(BpmnEdge.docked(n... | BoundaryEventConverter implements EdgeConverter<BoundaryEvent> { @Override public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) { String parentId = event.getAttachedToRef().getId(); String childId = event.getId(); return valid(nodes, parentId, childId) ? Result.success(BpmnEdge.docked(n... | BoundaryEventConverter implements EdgeConverter<BoundaryEvent> { @Override public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) { String parentId = event.getAttachedToRef().getId(); String childId = event.getId(); return valid(nodes, parentId, childId) ? Result.success(BpmnEdge.docked(n... | BoundaryEventConverter implements EdgeConverter<BoundaryEvent> { @Override public Result<BpmnEdge> convertEdge(BoundaryEvent event, Map<String, BpmnNode> nodes) { String parentId = event.getAttachedToRef().getId(); String childId = event.getId(); return valid(nodes, parentId, childId) ? Result.success(BpmnEdge.docked(n... |
@Test public void convertSupported() { StartEvent startEvent = mock(StartEvent.class); tested.convertNode(startEvent); verify(startEventConverter).convert(startEvent); EndEvent endEvent = mock(EndEvent.class); tested.convertNode(endEvent); verify(endEventConverter).convert(endEvent); BoundaryEvent boundaryEvent = mock(... | public Result<BpmnNode> convertNode(FlowElement flowElement) { return Match.of(FlowElement.class, Result.class) .when(StartEvent.class, converterFactory.startEventConverter()::convert) .when(EndEvent.class, converterFactory.endEventConverter()::convert) .when(BoundaryEvent.class, converterFactory.intermediateCatchEvent... | FlowElementConverter extends AbstractConverter { public Result<BpmnNode> convertNode(FlowElement flowElement) { return Match.of(FlowElement.class, Result.class) .when(StartEvent.class, converterFactory.startEventConverter()::convert) .when(EndEvent.class, converterFactory.endEventConverter()::convert) .when(BoundaryEve... | FlowElementConverter extends AbstractConverter { public Result<BpmnNode> convertNode(FlowElement flowElement) { return Match.of(FlowElement.class, Result.class) .when(StartEvent.class, converterFactory.startEventConverter()::convert) .when(EndEvent.class, converterFactory.endEventConverter()::convert) .when(BoundaryEve... | FlowElementConverter extends AbstractConverter { public Result<BpmnNode> convertNode(FlowElement flowElement) { return Match.of(FlowElement.class, Result.class) .when(StartEvent.class, converterFactory.startEventConverter()::convert) .when(EndEvent.class, converterFactory.endEventConverter()::convert) .when(BoundaryEve... | FlowElementConverter extends AbstractConverter { public Result<BpmnNode> convertNode(FlowElement flowElement) { return Match.of(FlowElement.class, Result.class) .when(StartEvent.class, converterFactory.startEventConverter()::convert) .when(EndEvent.class, converterFactory.endEventConverter()::convert) .when(BoundaryEve... |
@Test public void testCreateNode() { assertTrue(tested.createNode("id").getContent().getDefinition() instanceof BPMNDiagramImpl); } | @Override protected Node<View<BPMNDiagramImpl>, Edge> createNode(String id) { return delegate.factoryManager.newNode(id, BPMNDiagramImpl.class); } | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected Node<View<BPMNDiagramImpl>, Edge> createNode(String id) { return delegate.factoryManager.newNode(id, BPMNDiagramImpl.class); } } | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected Node<View<BPMNDiagramImpl>, Edge> createNode(String id) { return delegate.factoryManager.newNode(id, BPMNDiagramImpl.class); } RootProcessConverter(TypedFactoryManager typedFactoryManager,... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected Node<View<BPMNDiagramImpl>, Edge> createNode(String id) { return delegate.factoryManager.newNode(id, BPMNDiagramImpl.class); } RootProcessConverter(TypedFactoryManager typedFactoryManager,... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected Node<View<BPMNDiagramImpl>, Edge> createNode(String id) { return delegate.factoryManager.newNode(id, BPMNDiagramImpl.class); } RootProcessConverter(TypedFactoryManager typedFactoryManager,... |
@Test public void testCreateProcessData() { assertNotNull(tested.createProcessData("id")); } | @Override protected ProcessData createProcessData(String processVariables) { return new ProcessData(new ProcessVariables(processVariables)); } | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected ProcessData createProcessData(String processVariables) { return new ProcessData(new ProcessVariables(processVariables)); } } | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected ProcessData createProcessData(String processVariables) { return new ProcessData(new ProcessVariables(processVariables)); } RootProcessConverter(TypedFactoryManager typedFactoryManager,
... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected ProcessData createProcessData(String processVariables) { return new ProcessData(new ProcessVariables(processVariables)); } RootProcessConverter(TypedFactoryManager typedFactoryManager,
... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected ProcessData createProcessData(String processVariables) { return new ProcessData(new ProcessVariables(processVariables)); } RootProcessConverter(TypedFactoryManager typedFactoryManager,
... |
@Test public void testCreateDiagramSet() { DiagramSet diagramSet = createDiagramSet(); assertNotNull(diagramSet); } | @Override protected DiagramSet createDiagramSet(Process process, ProcessPropertyReader p, DefinitionsPropertyReader d) { return new DiagramSet(new Name(revertIllegalCharsAttribute(process.getName())), new Documentation(p.getDocumentation()), new Id(revertIllegalCharsAttribute(process.getId())), new Package(p.getPackage... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected DiagramSet createDiagramSet(Process process, ProcessPropertyReader p, DefinitionsPropertyReader d) { return new DiagramSet(new Name(revertIllegalCharsAttribute(process.getName())), new Doc... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected DiagramSet createDiagramSet(Process process, ProcessPropertyReader p, DefinitionsPropertyReader d) { return new DiagramSet(new Name(revertIllegalCharsAttribute(process.getName())), new Doc... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected DiagramSet createDiagramSet(Process process, ProcessPropertyReader p, DefinitionsPropertyReader d) { return new DiagramSet(new Name(revertIllegalCharsAttribute(process.getName())), new Doc... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected DiagramSet createDiagramSet(Process process, ProcessPropertyReader p, DefinitionsPropertyReader d) { return new DiagramSet(new Name(revertIllegalCharsAttribute(process.getName())), new Doc... |
@Test public void testImports() { DiagramSet diagramSet = createDiagramSet(); Imports imports = diagramSet.getImports(); assertNotNull(imports); ImportsValue importsValue = imports.getValue(); assertNotNull(importsValue); List<DefaultImport> defaultImports = importsValue.getDefaultImports(); assertNotNull(defaultImport... | @Override protected DiagramSet createDiagramSet(Process process, ProcessPropertyReader p, DefinitionsPropertyReader d) { return new DiagramSet(new Name(revertIllegalCharsAttribute(process.getName())), new Documentation(p.getDocumentation()), new Id(revertIllegalCharsAttribute(process.getId())), new Package(p.getPackage... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected DiagramSet createDiagramSet(Process process, ProcessPropertyReader p, DefinitionsPropertyReader d) { return new DiagramSet(new Name(revertIllegalCharsAttribute(process.getName())), new Doc... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected DiagramSet createDiagramSet(Process process, ProcessPropertyReader p, DefinitionsPropertyReader d) { return new DiagramSet(new Name(revertIllegalCharsAttribute(process.getName())), new Doc... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected DiagramSet createDiagramSet(Process process, ProcessPropertyReader p, DefinitionsPropertyReader d) { return new DiagramSet(new Name(revertIllegalCharsAttribute(process.getName())), new Doc... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected DiagramSet createDiagramSet(Process process, ProcessPropertyReader p, DefinitionsPropertyReader d) { return new DiagramSet(new Name(revertIllegalCharsAttribute(process.getName())), new Doc... |
@Test public void createAdvancedData() { assertTrue(AdvancedData.class.isInstance(tested.createAdvancedData("id", "testßval"))); } | @Override protected AdvancedData createAdvancedData(String globalVariables, String metaDataAttributes) { return new AdvancedData(new GlobalVariables(globalVariables), new MetaDataAttributes(metaDataAttributes)); } | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected AdvancedData createAdvancedData(String globalVariables, String metaDataAttributes) { return new AdvancedData(new GlobalVariables(globalVariables), new MetaDataAttributes(metaDataAttributes... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected AdvancedData createAdvancedData(String globalVariables, String metaDataAttributes) { return new AdvancedData(new GlobalVariables(globalVariables), new MetaDataAttributes(metaDataAttributes... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected AdvancedData createAdvancedData(String globalVariables, String metaDataAttributes) { return new AdvancedData(new GlobalVariables(globalVariables), new MetaDataAttributes(metaDataAttributes... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected AdvancedData createAdvancedData(String globalVariables, String metaDataAttributes) { return new AdvancedData(new GlobalVariables(globalVariables), new MetaDataAttributes(metaDataAttributes... |
@Test public void convertAdvancedData() { tested.createAdvancedData("id", "testßval"); assertTrue(tested.convertProcess().isSuccess()); } | @Override protected AdvancedData createAdvancedData(String globalVariables, String metaDataAttributes) { return new AdvancedData(new GlobalVariables(globalVariables), new MetaDataAttributes(metaDataAttributes)); } | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected AdvancedData createAdvancedData(String globalVariables, String metaDataAttributes) { return new AdvancedData(new GlobalVariables(globalVariables), new MetaDataAttributes(metaDataAttributes... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected AdvancedData createAdvancedData(String globalVariables, String metaDataAttributes) { return new AdvancedData(new GlobalVariables(globalVariables), new MetaDataAttributes(metaDataAttributes... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected AdvancedData createAdvancedData(String globalVariables, String metaDataAttributes) { return new AdvancedData(new GlobalVariables(globalVariables), new MetaDataAttributes(metaDataAttributes... | RootProcessConverter extends BaseRootProcessConverter<BPMNDiagramImpl, DiagramSet, ProcessData, AdvancedData> { @Override protected AdvancedData createAdvancedData(String globalVariables, String metaDataAttributes) { return new AdvancedData(new GlobalVariables(globalVariables), new MetaDataAttributes(metaDataAttributes... |
@Test public void testRemoveAllItems() { decisionComponents.removeAllItems(); verify(decisionComponents).clearDecisionComponents(); } | public void removeAllItems() { clearDecisionComponents(); } | DecisionComponents { public void removeAllItems() { clearDecisionComponents(); } } | DecisionComponents { public void removeAllItems() { clearDecisionComponents(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... | DecisionComponents { public void removeAllItems() { clearDecisionComponents(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... | DecisionComponents { public void removeAllItems() { clearDecisionComponents(); } DecisionComponents(); @Inject DecisionComponents(final View view,
final DMNIncludeModelsClient client,
final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
... |
@Test public void testConvertEdges() { Task task1 = mockTask("1"); Task task2 = mockTask("2"); BpmnNode task1Node = mockTaskNode(task1); BpmnNode task2Node = mockTaskNode(task2); SequenceFlow sequenceFlow = mockSequenceFlow("seq1", task1, task2); List<BaseElement> elements = Arrays.asList(sequenceFlow, task1, task2); a... | Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); boolean value = results.siz... | ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); ... | ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); ... | ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); ... | ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); ... |
@Test public void testConvertEdgesIgnoredNonEdgeElement() { Map<String, BpmnNode> nodes = new HashMap<>(); List<BaseElement> elements = Arrays.asList(mockTask("1")); assertFalse(converterDelegate.convertEdges(parentNode, elements, nodes).value()); } | Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); boolean value = results.siz... | ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); ... | ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); ... | ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); ... | ProcessConverterDelegate { Result<Boolean> convertEdges(BpmnNode processRoot, List<BaseElement> flowElements, Map<String, BpmnNode> nodes) { List<Result<BpmnEdge>> results = flowElements.stream() .map(e -> converterFactory.edgeConverter().convertEdge(e, nodes)) .filter(Result::isSuccess) .collect(Collectors.toList()); ... |
@Test public void testConvertUnsupportedChildNodes() { List<LaneSet> laneSets = Collections.emptyList(); List<FlowElement> flowElements = Arrays.asList(mockTask("1"), mockTask("2"), mockUnsupportedTask("3"), mockUnsupportedDataObject("4")); Result<Map<String, BpmnNode>> result = converterDelegate.convertChildNodes(pare... | Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())); } final Result<Map<Strin... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... |
@Test public void testConvertIgnoredFlowElements() { List<LaneSet> laneSets = Collections.emptyList(); List<FlowElement> flowElements = Arrays.asList(mockTask("1"), mockTask("2"), mockSequenceFlow("3", null, null), mockUnsupportedDataObject("4")); Result<Map<String, BpmnNode>> result = converterDelegate.convertChildNod... | Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())); } final Result<Map<Strin... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... |
@Test public void testConvertLanes() { Task task0_1 = mockTask("TASK0_1"); Task task0_2 = mockTask("TASK0_2"); Task task0_3 = mockTask("TASK0_3"); Task task1_1 = mockTask("TASK1_1"); Lane lane1 = mockLane("Lane1", "Lane1Name", task1_1); Task task2_1 = mockTask("TASK2_1"); Lane lane2 = mockLane("Lane2", "Lane2Name", tas... | Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())); } final Result<Map<Strin... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... | ProcessConverterDelegate { Result<Map<String, BpmnNode>> convertChildNodes( BpmnNode firstNode, List<FlowElement> flowElements, List<LaneSet> laneSets) { for (FlowElement element : flowElements) { element.setId(revertIllegalCharsAttribute(element.getId())); element.setName(revertIllegalCharsAttribute(element.getName())... |
@Test public void createNode() { assertTrue(AdHocSubprocess.class.isInstance(tested.createNode("id").getContent().getDefinition())); } | @Override protected Node<View<AdHocSubprocess>, Edge> createNode(String id) { return delegate.factoryManager.newNode(id, AdHocSubprocess.class); } | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected Node<View<AdHocSubprocess>, Edge> createNode(String id) { return delegate.factoryManager.newNode(id, AdHocSubprocess.class); } } | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected Node<View<AdHocSubprocess>, Edge> createNode(String id) { return delegate.factoryManager.newNode(id, AdHocSubprocess.class); } SubProcessConverter(TypedFactoryManager typedFactoryMana... | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected Node<View<AdHocSubprocess>, Edge> createNode(String id) { return delegate.factoryManager.newNode(id, AdHocSubprocess.class); } SubProcessConverter(TypedFactoryManager typedFactoryMana... | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected Node<View<AdHocSubprocess>, Edge> createNode(String id) { return delegate.factoryManager.newNode(id, AdHocSubprocess.class); } SubProcessConverter(TypedFactoryManager typedFactoryMana... |
@Test public void createProcessData() { assertTrue(ProcessData.class.isInstance(tested.createProcessData("id"))); } | @Override protected ProcessData createProcessData(String processVariables) { return new ProcessData(new ProcessVariables(processVariables)); } | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected ProcessData createProcessData(String processVariables) { return new ProcessData(new ProcessVariables(processVariables)); } } | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected ProcessData createProcessData(String processVariables) { return new ProcessData(new ProcessVariables(processVariables)); } SubProcessConverter(TypedFactoryManager typedFactoryManager,... | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected ProcessData createProcessData(String processVariables) { return new ProcessData(new ProcessVariables(processVariables)); } SubProcessConverter(TypedFactoryManager typedFactoryManager,... | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected ProcessData createProcessData(String processVariables) { return new ProcessData(new ProcessVariables(processVariables)); } SubProcessConverter(TypedFactoryManager typedFactoryManager,... |
@Test public void testCreateAdHocSubprocessTaskExecutionSet() { AdHocSubProcess adHocSubProcess = mock(AdHocSubProcess.class); when(adHocSubProcess.getCompletionCondition()).thenReturn(mock(FormalExpression.class)); when(adHocSubProcess.getOrdering()).thenReturn(AdHocOrdering.SEQUENTIAL); assertTrue(AdHocSubprocessTask... | @Override protected AdHocSubprocessTaskExecutionSet createAdHocSubprocessTaskExecutionSet(AdHocSubProcessPropertyReader p) { return new AdHocSubprocessTaskExecutionSet(new AdHocActivationCondition(p.getAdHocActivationCondition()), new AdHocCompletionCondition(p.getAdHocCompletionCondition()), new AdHocOrdering(p.getAdH... | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected AdHocSubprocessTaskExecutionSet createAdHocSubprocessTaskExecutionSet(AdHocSubProcessPropertyReader p) { return new AdHocSubprocessTaskExecutionSet(new AdHocActivationCondition(p.getA... | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected AdHocSubprocessTaskExecutionSet createAdHocSubprocessTaskExecutionSet(AdHocSubProcessPropertyReader p) { return new AdHocSubprocessTaskExecutionSet(new AdHocActivationCondition(p.getA... | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected AdHocSubprocessTaskExecutionSet createAdHocSubprocessTaskExecutionSet(AdHocSubProcessPropertyReader p) { return new AdHocSubprocessTaskExecutionSet(new AdHocActivationCondition(p.getA... | SubProcessConverter extends BaseSubProcessConverter<AdHocSubprocess, ProcessData, AdHocSubprocessTaskExecutionSet> { @Override protected AdHocSubprocessTaskExecutionSet createAdHocSubprocessTaskExecutionSet(AdHocSubProcessPropertyReader p) { return new AdHocSubprocessTaskExecutionSet(new AdHocActivationCondition(p.getA... |
@Test public void compose() { final Result result = ResultComposer.compose(value, result1, result2, result3); assertResult(result); } | public static <T, R> Result compose(T value, Collection<Result<R>>... results) { List<MarshallingMessage> messages = Stream.of(results).flatMap(Collection::stream) .map(Result::messages) .flatMap(List::stream) .collect(Collectors.toList()); return Result.success(value, messages.stream().toArray(MarshallingMessage[]::ne... | ResultComposer { public static <T, R> Result compose(T value, Collection<Result<R>>... results) { List<MarshallingMessage> messages = Stream.of(results).flatMap(Collection::stream) .map(Result::messages) .flatMap(List::stream) .collect(Collectors.toList()); return Result.success(value, messages.stream().toArray(Marshal... | ResultComposer { public static <T, R> Result compose(T value, Collection<Result<R>>... results) { List<MarshallingMessage> messages = Stream.of(results).flatMap(Collection::stream) .map(Result::messages) .flatMap(List::stream) .collect(Collectors.toList()); return Result.success(value, messages.stream().toArray(Marshal... | ResultComposer { public static <T, R> Result compose(T value, Collection<Result<R>>... results) { List<MarshallingMessage> messages = Stream.of(results).flatMap(Collection::stream) .map(Result::messages) .flatMap(List::stream) .collect(Collectors.toList()); return Result.success(value, messages.stream().toArray(Marshal... | ResultComposer { public static <T, R> Result compose(T value, Collection<Result<R>>... results) { List<MarshallingMessage> messages = Stream.of(results).flatMap(Collection::stream) .map(Result::messages) .flatMap(List::stream) .collect(Collectors.toList()); return Result.success(value, messages.stream().toArray(Marshal... |
@Test public void composeList() { final Result result = ResultComposer.compose(value, Arrays.asList(result1, result2, result3)); assertResult(result); } | public static <T, R> Result compose(T value, Collection<Result<R>>... results) { List<MarshallingMessage> messages = Stream.of(results).flatMap(Collection::stream) .map(Result::messages) .flatMap(List::stream) .collect(Collectors.toList()); return Result.success(value, messages.stream().toArray(MarshallingMessage[]::ne... | ResultComposer { public static <T, R> Result compose(T value, Collection<Result<R>>... results) { List<MarshallingMessage> messages = Stream.of(results).flatMap(Collection::stream) .map(Result::messages) .flatMap(List::stream) .collect(Collectors.toList()); return Result.success(value, messages.stream().toArray(Marshal... | ResultComposer { public static <T, R> Result compose(T value, Collection<Result<R>>... results) { List<MarshallingMessage> messages = Stream.of(results).flatMap(Collection::stream) .map(Result::messages) .flatMap(List::stream) .collect(Collectors.toList()); return Result.success(value, messages.stream().toArray(Marshal... | ResultComposer { public static <T, R> Result compose(T value, Collection<Result<R>>... results) { List<MarshallingMessage> messages = Stream.of(results).flatMap(Collection::stream) .map(Result::messages) .flatMap(List::stream) .collect(Collectors.toList()); return Result.success(value, messages.stream().toArray(Marshal... | ResultComposer { public static <T, R> Result compose(T value, Collection<Result<R>>... results) { List<MarshallingMessage> messages = Stream.of(results).flatMap(Collection::stream) .map(Result::messages) .flatMap(List::stream) .collect(Collectors.toList()); return Result.success(value, messages.stream().toArray(Marshal... |
@Test public void testAsDMNIncludedModel() { final String modelName = "Model Name"; final String namespace = "The Namespace"; final String type = "The type"; final String file = "my file.dmn"; final String filePath = " final Import anImport = new Import(); anImport.setName(new Name(modelName)); anImport.setNamespace(na... | DMNIncludedModel asDMNIncludedModel(final Import anImport) { final String modelName = anImport.getName().getValue(); final String namespace = anImport.getNamespace(); final String importType = anImport.getImportType(); final String path = FileUtils.getFileName(anImport.getLocationURI().getValue()); return new DMNInclud... | DecisionComponents { DMNIncludedModel asDMNIncludedModel(final Import anImport) { final String modelName = anImport.getName().getValue(); final String namespace = anImport.getNamespace(); final String importType = anImport.getImportType(); final String path = FileUtils.getFileName(anImport.getLocationURI().getValue());... | DecisionComponents { DMNIncludedModel asDMNIncludedModel(final Import anImport) { final String modelName = anImport.getName().getValue(); final String namespace = anImport.getNamespace(); final String importType = anImport.getImportType(); final String path = FileUtils.getFileName(anImport.getLocationURI().getValue());... | DecisionComponents { DMNIncludedModel asDMNIncludedModel(final Import anImport) { final String modelName = anImport.getName().getValue(); final String namespace = anImport.getNamespace(); final String importType = anImport.getImportType(); final String path = FileUtils.getFileName(anImport.getLocationURI().getValue());... | DecisionComponents { DMNIncludedModel asDMNIncludedModel(final Import anImport) { final String modelName = anImport.getName().getValue(); final String namespace = anImport.getNamespace(); final String importType = anImport.getImportType(); final String path = FileUtils.getFileName(anImport.getLocationURI().getValue());... |
@Test public void testGet() { Object value = new Object(); elementDefinition.setValue(baseElement, value); assertEquals(value, new CustomElement<>(elementDefinition, baseElement).get()); } | public T get() { return elementDefinition.getValue(element); } | CustomElement { public T get() { return elementDefinition.getValue(element); } } | CustomElement { public T get() { return elementDefinition.getValue(element); } CustomElement(ElementDefinition<T> elementDefinition, BaseElement element); } | CustomElement { public T get() { return elementDefinition.getValue(element); } CustomElement(ElementDefinition<T> elementDefinition, BaseElement element); T get(); void set(T value); } | CustomElement { public T get() { return elementDefinition.getValue(element); } CustomElement(ElementDefinition<T> elementDefinition, BaseElement element); T get(); void set(T value); static final MetadataTypeDefinition<Boolean> async; static final MetadataTypeDefinition<Boolean> autoStart; static final MetadataTypeDefi... |
@Test public void testSetNonDefaultValue() { Object newValue = new Object(); CustomElement<Object> customElement = new CustomElement<>(elementDefinition, baseElement); customElement.set(newValue); assertEquals(newValue, elementDefinition.getValue(baseElement)); } | public void set(T value) { if (value != null && !value.equals(elementDefinition.getDefaultValue())) { elementDefinition.setValue(element, value); } } | CustomElement { public void set(T value) { if (value != null && !value.equals(elementDefinition.getDefaultValue())) { elementDefinition.setValue(element, value); } } } | CustomElement { public void set(T value) { if (value != null && !value.equals(elementDefinition.getDefaultValue())) { elementDefinition.setValue(element, value); } } CustomElement(ElementDefinition<T> elementDefinition, BaseElement element); } | CustomElement { public void set(T value) { if (value != null && !value.equals(elementDefinition.getDefaultValue())) { elementDefinition.setValue(element, value); } } CustomElement(ElementDefinition<T> elementDefinition, BaseElement element); T get(); void set(T value); } | CustomElement { public void set(T value) { if (value != null && !value.equals(elementDefinition.getDefaultValue())) { elementDefinition.setValue(element, value); } } CustomElement(ElementDefinition<T> elementDefinition, BaseElement element); T get(); void set(T value); static final MetadataTypeDefinition<Boolean> async... |
@Test public void shouldReuseInputSet() { Task task = bpmn2.createTask(); StringInput stringInput = new StringInput("BLAH", "ATYPE", "DEFAULTVAL"); stringInput.of(task).set("VALUE"); StringInput stringInput2 = new StringInput("BLAH2", "ATYPE", "DEFAULTVAL"); stringInput.of(task).set("VALUE"); InputOutputSpecification i... | public CustomInput<T> of(Task element) { return new CustomInput<>(this, element); } | CustomInputDefinition { public CustomInput<T> of(Task element) { return new CustomInput<>(this, element); } } | CustomInputDefinition { public CustomInput<T> of(Task element) { return new CustomInput<>(this, element); } CustomInputDefinition(String name, String type, T defaultValue); } | CustomInputDefinition { public CustomInput<T> of(Task element) { return new CustomInput<>(this, element); } CustomInputDefinition(String name, String type, T defaultValue); String name(); String type(); abstract T getValue(Task element); CustomInput<T> of(Task element); } | CustomInputDefinition { public CustomInput<T> of(Task element) { return new CustomInput<>(this, element); } CustomInputDefinition(String name, String type, T defaultValue); String name(); String type(); abstract T getValue(Task element); CustomInput<T> of(Task element); } |
@Test public void testGetValue() { BaseElement baseElement = bpmn2.createProcess(); assertEquals(new ArrayList<>(), CustomElement.defaultImports.of(baseElement).get()); } | @Override public List<DefaultImport> getValue(BaseElement element) { List<ExtensionAttributeValue> extValues = element.getExtensionValues(); List<DefaultImport> defaultImports = extValues.stream() .map(ExtensionAttributeValue::getValue) .flatMap((Function<FeatureMap, Stream<?>>) extensionElements -> { List o = (List) e... | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { @Override public List<DefaultImport> getValue(BaseElement element) { List<ExtensionAttributeValue> extValues = element.getExtensionValues(); List<DefaultImport> defaultImports = extValues.stream() .map(ExtensionAttributeValue::getValue) .flatMap((Fu... | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { @Override public List<DefaultImport> getValue(BaseElement element) { List<ExtensionAttributeValue> extValues = element.getExtensionValues(); List<DefaultImport> defaultImports = extValues.stream() .map(ExtensionAttributeValue::getValue) .flatMap((Fu... | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { @Override public List<DefaultImport> getValue(BaseElement element) { List<ExtensionAttributeValue> extValues = element.getExtensionValues(); List<DefaultImport> defaultImports = extValues.stream() .map(ExtensionAttributeValue::getValue) .flatMap((Fu... | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { @Override public List<DefaultImport> getValue(BaseElement element) { List<ExtensionAttributeValue> extValues = element.getExtensionValues(); List<DefaultImport> defaultImports = extValues.stream() .map(ExtensionAttributeValue::getValue) .flatMap((Fu... |
@Test public void testSetValue() { List<DefaultImport> defaultImports = new ArrayList<>(); defaultImports.add(new DefaultImport(CLASS_NAME + 1)); defaultImports.add(new DefaultImport(CLASS_NAME + 2)); defaultImports.add(new DefaultImport(CLASS_NAME + 3)); BaseElement baseElement = bpmn2.createProcess(); CustomElement.d... | @Override public void setValue(BaseElement element, List<DefaultImport> value) { value.stream() .map(DefaultImportsElement::extensionOf) .forEach(getExtensionElements(element)::add); } | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { @Override public void setValue(BaseElement element, List<DefaultImport> value) { value.stream() .map(DefaultImportsElement::extensionOf) .forEach(getExtensionElements(element)::add); } } | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { @Override public void setValue(BaseElement element, List<DefaultImport> value) { value.stream() .map(DefaultImportsElement::extensionOf) .forEach(getExtensionElements(element)::add); } DefaultImportsElement(String name); } | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { @Override public void setValue(BaseElement element, List<DefaultImport> value) { value.stream() .map(DefaultImportsElement::extensionOf) .forEach(getExtensionElements(element)::add); } DefaultImportsElement(String name); @Override List<DefaultImport... | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { @Override public void setValue(BaseElement element, List<DefaultImport> value) { value.stream() .map(DefaultImportsElement::extensionOf) .forEach(getExtensionElements(element)::add); } DefaultImportsElement(String name); @Override List<DefaultImport... |
@Test public void extensionOf() { DefaultImportsElement defaultImportsElement = new DefaultImportsElement(NAME); DefaultImport defaultImport = new DefaultImport(CLASS_NAME); ImportType importType = defaultImportsElement.importTypeDataOf(defaultImport); FeatureMap.Entry entry = defaultImportsElement.extensionOf(defaultI... | public static FeatureMap.Entry extensionOf(DefaultImport defaultImport) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__IMPORT, importTypeDataOf(defaultImport)); } | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { public static FeatureMap.Entry extensionOf(DefaultImport defaultImport) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__IMPORT, importTypeDataOf(defaultImport)); } } | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { public static FeatureMap.Entry extensionOf(DefaultImport defaultImport) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__IMPORT, importTypeDataOf(defaultImport)); } DefaultImportsElement(String ... | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { public static FeatureMap.Entry extensionOf(DefaultImport defaultImport) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__IMPORT, importTypeDataOf(defaultImport)); } DefaultImportsElement(String ... | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { public static FeatureMap.Entry extensionOf(DefaultImport defaultImport) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__IMPORT, importTypeDataOf(defaultImport)); } DefaultImportsElement(String ... |
@Test public void importTypeDataOf() { DefaultImportsElement defaultImportsElement = new DefaultImportsElement(NAME); DefaultImport defaultImport = new DefaultImport(CLASS_NAME); ImportType importType = defaultImportsElement.importTypeDataOf(defaultImport); assertEquals(CLASS_NAME, importType.getName()); } | public static ImportType importTypeDataOf(DefaultImport defaultImport) { ImportType importType = DroolsFactory.eINSTANCE.createImportType(); importType.setName(defaultImport.getClassName()); return importType; } | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { public static ImportType importTypeDataOf(DefaultImport defaultImport) { ImportType importType = DroolsFactory.eINSTANCE.createImportType(); importType.setName(defaultImport.getClassName()); return importType; } } | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { public static ImportType importTypeDataOf(DefaultImport defaultImport) { ImportType importType = DroolsFactory.eINSTANCE.createImportType(); importType.setName(defaultImport.getClassName()); return importType; } DefaultImportsElement(String name); } | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { public static ImportType importTypeDataOf(DefaultImport defaultImport) { ImportType importType = DroolsFactory.eINSTANCE.createImportType(); importType.setName(defaultImport.getClassName()); return importType; } DefaultImportsElement(String name); @... | DefaultImportsElement extends ElementDefinition<List<DefaultImport>> { public static ImportType importTypeDataOf(DefaultImport defaultImport) { ImportType importType = DroolsFactory.eINSTANCE.createImportType(); importType.setName(defaultImport.getClassName()); return importType; } DefaultImportsElement(String name); @... |
@Test public void testSetValue() { BaseElement baseElement = bpmn2.createProcess(); CustomElement.metaDataAttributes.of(baseElement).set(ATTRIBUTES); assertEquals("att1ß<![CDATA[val1]]>Øatt2ß<![CDATA[val2]]>Øatt3ß<![CDATA[val3]]>", CustomElement.metaDataAttributes.of(baseElement).get()); } | @Override public void setValue(BaseElement element, String value) { setStringValue(element, value); } | MetaDataAttributesElement extends ElementDefinition<String> { @Override public void setValue(BaseElement element, String value) { setStringValue(element, value); } } | MetaDataAttributesElement extends ElementDefinition<String> { @Override public void setValue(BaseElement element, String value) { setStringValue(element, value); } MetaDataAttributesElement(String name); } | MetaDataAttributesElement extends ElementDefinition<String> { @Override public void setValue(BaseElement element, String value) { setStringValue(element, value); } MetaDataAttributesElement(String name); @Override String getValue(BaseElement element); @Override void setValue(BaseElement element, String value); } | MetaDataAttributesElement extends ElementDefinition<String> { @Override public void setValue(BaseElement element, String value) { setStringValue(element, value); } MetaDataAttributesElement(String name); @Override String getValue(BaseElement element); @Override void setValue(BaseElement element, String value); static f... |
@Test public void testExtensionOf() { MetaDataAttributesElement metaDataAttributesElement = new MetaDataAttributesElement(NAME); MetaDataType metaDataType = metaDataAttributesElement.metaDataTypeDataOf(ATTRIBUTE); FeatureMap.Entry entry = metaDataAttributesElement.extensionOf(ATTRIBUTE); assertNotNull(entry); assertTru... | protected FeatureMap.Entry extensionOf(String metaData) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__META_DATA, metaDataTypeDataOf(metaData)); } | MetaDataAttributesElement extends ElementDefinition<String> { protected FeatureMap.Entry extensionOf(String metaData) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__META_DATA, metaDataTypeDataOf(metaData)); } } | MetaDataAttributesElement extends ElementDefinition<String> { protected FeatureMap.Entry extensionOf(String metaData) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__META_DATA, metaDataTypeDataOf(metaData)); } MetaDataAttributesElement(String name); } | MetaDataAttributesElement extends ElementDefinition<String> { protected FeatureMap.Entry extensionOf(String metaData) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__META_DATA, metaDataTypeDataOf(metaData)); } MetaDataAttributesElement(String name); @Override Stri... | MetaDataAttributesElement extends ElementDefinition<String> { protected FeatureMap.Entry extensionOf(String metaData) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__META_DATA, metaDataTypeDataOf(metaData)); } MetaDataAttributesElement(String name); @Override Stri... |
@Test public void testImportTypeDataOf() { MetaDataAttributesElement metaDataAttributesElement = new MetaDataAttributesElement(NAME); MetaDataType metaDataType = metaDataAttributesElement.metaDataTypeDataOf(ATTRIBUTE); assertTrue("att1ß<![CDATA[val1]]>".startsWith(metaDataType.getName())); assertTrue("att1ß<![CDATA[val... | protected MetaDataType metaDataTypeDataOf(String metaData) { MetaDataType metaDataType = DroolsFactory.eINSTANCE.createMetaDataType(); String[] properties = metaData.split(SEPARATOR); metaDataType.setName(properties[0]); metaDataType.setMetaValue(properties.length > 1 ? asCData(properties[1]) : null); return metaDataTy... | MetaDataAttributesElement extends ElementDefinition<String> { protected MetaDataType metaDataTypeDataOf(String metaData) { MetaDataType metaDataType = DroolsFactory.eINSTANCE.createMetaDataType(); String[] properties = metaData.split(SEPARATOR); metaDataType.setName(properties[0]); metaDataType.setMetaValue(properties.... | MetaDataAttributesElement extends ElementDefinition<String> { protected MetaDataType metaDataTypeDataOf(String metaData) { MetaDataType metaDataType = DroolsFactory.eINSTANCE.createMetaDataType(); String[] properties = metaData.split(SEPARATOR); metaDataType.setName(properties[0]); metaDataType.setMetaValue(properties.... | MetaDataAttributesElement extends ElementDefinition<String> { protected MetaDataType metaDataTypeDataOf(String metaData) { MetaDataType metaDataType = DroolsFactory.eINSTANCE.createMetaDataType(); String[] properties = metaData.split(SEPARATOR); metaDataType.setName(properties[0]); metaDataType.setMetaValue(properties.... | MetaDataAttributesElement extends ElementDefinition<String> { protected MetaDataType metaDataTypeDataOf(String metaData) { MetaDataType metaDataType = DroolsFactory.eINSTANCE.createMetaDataType(); String[] properties = metaData.split(SEPARATOR); metaDataType.setName(properties[0]); metaDataType.setMetaValue(properties.... |
@Test public void testCreateDecisionComponentItem() { final DecisionComponentsItem item = mock(DecisionComponentsItem.class); final List<DecisionComponentsItem> decisionComponentsItems = spy(new ArrayList<>()); final DecisionComponentsItem.View decisionComponentsView = mock(DecisionComponentsItem.View.class); final HTM... | void createDecisionComponentItem(final DecisionComponent component) { final DecisionComponentsItem item = itemManagedInstance.get(); item.setDecisionComponent(component); getDecisionComponentsItems().add(item); view.addListItem(item.getView().getElement()); } | DecisionComponents { void createDecisionComponentItem(final DecisionComponent component) { final DecisionComponentsItem item = itemManagedInstance.get(); item.setDecisionComponent(component); getDecisionComponentsItems().add(item); view.addListItem(item.getView().getElement()); } } | DecisionComponents { void createDecisionComponentItem(final DecisionComponent component) { final DecisionComponentsItem item = itemManagedInstance.get(); item.setDecisionComponent(component); getDecisionComponentsItems().add(item); view.addListItem(item.getView().getElement()); } DecisionComponents(); @Inject Decision... | DecisionComponents { void createDecisionComponentItem(final DecisionComponent component) { final DecisionComponentsItem item = itemManagedInstance.get(); item.setDecisionComponent(component); getDecisionComponentsItems().add(item); view.addListItem(item.getView().getElement()); } DecisionComponents(); @Inject Decision... | DecisionComponents { void createDecisionComponentItem(final DecisionComponent component) { final DecisionComponentsItem item = itemManagedInstance.get(); item.setDecisionComponent(component); getDecisionComponentsItems().add(item); view.addListItem(item.getView().getElement()); } DecisionComponents(); @Inject Decision... |
@Test public void testGetValue() { BaseElement baseElement = bpmn2.createProcess(); CustomElement.globalVariables.of(baseElement).set(GLOBAL_VARIABLES); assertEquals(GLOBAL_VARIABLES, CustomElement.globalVariables.of(baseElement).get()); } | @Override public String getValue(BaseElement element) { return getStringValue(element) .orElse(getDefaultValue()); } | GlobalVariablesElement extends ElementDefinition<String> { @Override public String getValue(BaseElement element) { return getStringValue(element) .orElse(getDefaultValue()); } } | GlobalVariablesElement extends ElementDefinition<String> { @Override public String getValue(BaseElement element) { return getStringValue(element) .orElse(getDefaultValue()); } GlobalVariablesElement(String name); } | GlobalVariablesElement extends ElementDefinition<String> { @Override public String getValue(BaseElement element) { return getStringValue(element) .orElse(getDefaultValue()); } GlobalVariablesElement(String name); @Override String getValue(BaseElement element); @Override void setValue(BaseElement element, String value);... | GlobalVariablesElement extends ElementDefinition<String> { @Override public String getValue(BaseElement element) { return getStringValue(element) .orElse(getDefaultValue()); } GlobalVariablesElement(String name); @Override String getValue(BaseElement element); @Override void setValue(BaseElement element, String value);... |
@Test public void testSetValue() { BaseElement baseElement = bpmn2.createProcess(); CustomElement.globalVariables.of(baseElement).set(GLOBAL_VARIABLES); assertEquals(GLOBAL_VARIABLES, CustomElement.globalVariables.of(baseElement).get()); } | @Override public void setValue(BaseElement element, String value) { setStringValue(element, value); } | GlobalVariablesElement extends ElementDefinition<String> { @Override public void setValue(BaseElement element, String value) { setStringValue(element, value); } } | GlobalVariablesElement extends ElementDefinition<String> { @Override public void setValue(BaseElement element, String value) { setStringValue(element, value); } GlobalVariablesElement(String name); } | GlobalVariablesElement extends ElementDefinition<String> { @Override public void setValue(BaseElement element, String value) { setStringValue(element, value); } GlobalVariablesElement(String name); @Override String getValue(BaseElement element); @Override void setValue(BaseElement element, String value); } | GlobalVariablesElement extends ElementDefinition<String> { @Override public void setValue(BaseElement element, String value) { setStringValue(element, value); } GlobalVariablesElement(String name); @Override String getValue(BaseElement element); @Override void setValue(BaseElement element, String value); } |
@Test public void testExtensionOf() { GlobalVariablesElement globalVariablesElement = new GlobalVariablesElement(NAME); GlobalType globalType = globalVariablesElement.globalTypeDataOf(GLOBAL_VARIABLE); FeatureMap.Entry entry = globalVariablesElement.extensionOf(GLOBAL_VARIABLE); assertNotNull(entry); assertTrue(entry i... | static FeatureMap.Entry extensionOf(String variable) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__GLOBAL, globalTypeDataOf(variable)); } | GlobalVariablesElement extends ElementDefinition<String> { static FeatureMap.Entry extensionOf(String variable) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__GLOBAL, globalTypeDataOf(variable)); } } | GlobalVariablesElement extends ElementDefinition<String> { static FeatureMap.Entry extensionOf(String variable) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__GLOBAL, globalTypeDataOf(variable)); } GlobalVariablesElement(String name); } | GlobalVariablesElement extends ElementDefinition<String> { static FeatureMap.Entry extensionOf(String variable) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__GLOBAL, globalTypeDataOf(variable)); } GlobalVariablesElement(String name); @Override String getValue(Ba... | GlobalVariablesElement extends ElementDefinition<String> { static FeatureMap.Entry extensionOf(String variable) { return new EStructuralFeatureImpl.SimpleFeatureMapEntry( (EStructuralFeature.Internal) DOCUMENT_ROOT__GLOBAL, globalTypeDataOf(variable)); } GlobalVariablesElement(String name); @Override String getValue(Ba... |
@Test public void testGlobalTypeDataOf() { GlobalVariablesElement globalVariablesElement = new GlobalVariablesElement(NAME); GlobalType globalType = globalVariablesElement.globalTypeDataOf(GLOBAL_VARIABLE); assertTrue(GLOBAL_VARIABLE.startsWith(globalType.getIdentifier())); assertTrue(GLOBAL_VARIABLE.endsWith(globalTyp... | static GlobalType globalTypeDataOf(String variable) { GlobalType globalType = DroolsFactory.eINSTANCE.createGlobalType(); String[] properties = variable.split(":", -1); globalType.setIdentifier(properties[0]); globalType.setType(properties[1]); return globalType; } | GlobalVariablesElement extends ElementDefinition<String> { static GlobalType globalTypeDataOf(String variable) { GlobalType globalType = DroolsFactory.eINSTANCE.createGlobalType(); String[] properties = variable.split(":", -1); globalType.setIdentifier(properties[0]); globalType.setType(properties[1]); return globalTyp... | GlobalVariablesElement extends ElementDefinition<String> { static GlobalType globalTypeDataOf(String variable) { GlobalType globalType = DroolsFactory.eINSTANCE.createGlobalType(); String[] properties = variable.split(":", -1); globalType.setIdentifier(properties[0]); globalType.setType(properties[1]); return globalTyp... | GlobalVariablesElement extends ElementDefinition<String> { static GlobalType globalTypeDataOf(String variable) { GlobalType globalType = DroolsFactory.eINSTANCE.createGlobalType(); String[] properties = variable.split(":", -1); globalType.setIdentifier(properties[0]); globalType.setType(properties[1]); return globalTyp... | GlobalVariablesElement extends ElementDefinition<String> { static GlobalType globalTypeDataOf(String variable) { GlobalType globalType = DroolsFactory.eINSTANCE.createGlobalType(); String[] properties = variable.split(":", -1); globalType.setIdentifier(properties[0]); globalType.setType(properties[1]); return globalTyp... |
@Test(expected = IllegalArgumentException.class) public void testFromStringNull() { AssociationDeclaration.fromString(null); } | public static AssociationDeclaration fromString(String encoded) { return AssociationParser.parse(encoded); } | AssociationDeclaration { public static AssociationDeclaration fromString(String encoded) { return AssociationParser.parse(encoded); } } | AssociationDeclaration { public static AssociationDeclaration fromString(String encoded) { return AssociationParser.parse(encoded); } AssociationDeclaration(Direction direction, Type type, String source, String target); } | AssociationDeclaration { public static AssociationDeclaration fromString(String encoded) { return AssociationParser.parse(encoded); } AssociationDeclaration(Direction direction, Type type, String source, String target); static AssociationDeclaration fromString(String encoded); String getSource(); void setSource(String ... | AssociationDeclaration { public static AssociationDeclaration fromString(String encoded) { return AssociationParser.parse(encoded); } AssociationDeclaration(Direction direction, Type type, String source, String target); static AssociationDeclaration fromString(String encoded); String getSource(); void setSource(String ... |
@Test(expected = IllegalArgumentException.class) public void testFromStringEmpty() { AssociationDeclaration.fromString(""); } | public static AssociationDeclaration fromString(String encoded) { return AssociationParser.parse(encoded); } | AssociationDeclaration { public static AssociationDeclaration fromString(String encoded) { return AssociationParser.parse(encoded); } } | AssociationDeclaration { public static AssociationDeclaration fromString(String encoded) { return AssociationParser.parse(encoded); } AssociationDeclaration(Direction direction, Type type, String source, String target); } | AssociationDeclaration { public static AssociationDeclaration fromString(String encoded) { return AssociationParser.parse(encoded); } AssociationDeclaration(Direction direction, Type type, String source, String target); static AssociationDeclaration fromString(String encoded); String getSource(); void setSource(String ... | AssociationDeclaration { public static AssociationDeclaration fromString(String encoded) { return AssociationParser.parse(encoded); } AssociationDeclaration(Direction direction, Type type, String source, String target); static AssociationDeclaration fromString(String encoded); String getSource(); void setSource(String ... |
@Test public void testIdentifier() { String identifier = tested.getIdentifier(); assertEquals(identifier, VAR_IDENTIFIER); } | public String getIdentifier() { return identifier; } | VariableDeclaration { public String getIdentifier() { return identifier; } } | VariableDeclaration { public String getIdentifier() { return identifier; } VariableDeclaration(String identifier, String type); VariableDeclaration(String identifier, String type, String tags); } | VariableDeclaration { public String getIdentifier() { return identifier; } VariableDeclaration(String identifier, String type); VariableDeclaration(String identifier, String type, String tags); static VariableDeclaration fromString(String encoded); String getTags(); void setTags(String tags); String getIdentifier(); v... | VariableDeclaration { public String getIdentifier() { return identifier; } VariableDeclaration(String identifier, String type); VariableDeclaration(String identifier, String type, String tags); static VariableDeclaration fromString(String encoded); String getTags(); void setTags(String tags); String getIdentifier(); v... |
@Test public void testName() { String name = tested.getTypedIdentifier().getName(); assertEquals(name, VAR_NAME); } | public Property getTypedIdentifier() { return typedIdentifier; } | VariableDeclaration { public Property getTypedIdentifier() { return typedIdentifier; } } | VariableDeclaration { public Property getTypedIdentifier() { return typedIdentifier; } VariableDeclaration(String identifier, String type); VariableDeclaration(String identifier, String type, String tags); } | VariableDeclaration { public Property getTypedIdentifier() { return typedIdentifier; } VariableDeclaration(String identifier, String type); VariableDeclaration(String identifier, String type, String tags); static VariableDeclaration fromString(String encoded); String getTags(); void setTags(String tags); String getIde... | VariableDeclaration { public Property getTypedIdentifier() { return typedIdentifier; } VariableDeclaration(String identifier, String type); VariableDeclaration(String identifier, String type, String tags); static VariableDeclaration fromString(String encoded); String getTags(); void setTags(String tags); String getIde... |
@Test public void testTags() { String tags = tested.getTags(); assertEquals(CONSTRUCTOR_TAGS, tags); } | public String getTags() { return tags; } | VariableDeclaration { public String getTags() { return tags; } } | VariableDeclaration { public String getTags() { return tags; } VariableDeclaration(String identifier, String type); VariableDeclaration(String identifier, String type, String tags); } | VariableDeclaration { public String getTags() { return tags; } VariableDeclaration(String identifier, String type); VariableDeclaration(String identifier, String type, String tags); static VariableDeclaration fromString(String encoded); String getTags(); void setTags(String tags); String getIdentifier(); void setIdent... | VariableDeclaration { public String getTags() { return tags; } VariableDeclaration(String identifier, String type); VariableDeclaration(String identifier, String type, String tags); static VariableDeclaration fromString(String encoded); String getTags(); void setTags(String tags); String getIdentifier(); void setIdent... |
@Test public void testEquals() { VariableDeclaration comparable = new VariableDeclaration(CONSTRUCTOR_IDENTIFIER, CONSTRUCTOR_TYPE, CONSTRUCTOR_TAGS); assertEquals(tested, comparable); } | @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } VariableDeclaration that = (VariableDeclaration) o; return Objects.equals(identifier, that.identifier) && Objects.equals(type, that.type) && Objects.equals(tags, that.tags); } | VariableDeclaration { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } VariableDeclaration that = (VariableDeclaration) o; return Objects.equals(identifier, that.identifier) && Objects.equals(type, that.type) && Objects.equals(tag... | VariableDeclaration { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } VariableDeclaration that = (VariableDeclaration) o; return Objects.equals(identifier, that.identifier) && Objects.equals(type, that.type) && Objects.equals(tag... | VariableDeclaration { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } VariableDeclaration that = (VariableDeclaration) o; return Objects.equals(identifier, that.identifier) && Objects.equals(type, that.type) && Objects.equals(tag... | VariableDeclaration { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } VariableDeclaration that = (VariableDeclaration) o; return Objects.equals(identifier, that.identifier) && Objects.equals(type, that.type) && Objects.equals(tag... |
@Test public void testCreateDecisionComponentItems() { final List<DecisionComponent> decisionComponentsItems = new ArrayList<>(); decisionComponentsItems.add(makeDecisionComponent("Decision-1", "uuid1", "ModelName", false)); decisionComponentsItems.add(makeDecisionComponent("Decision-1", "uuid1", "ModelName", false)); ... | void createDecisionComponentItems(final List<DecisionComponent> decisionComponents) { for (final DecisionComponent component : decisionComponents) { if (!isDRGElementAdded(component)) { createDecisionComponentItem(component); } } } | DecisionComponents { void createDecisionComponentItems(final List<DecisionComponent> decisionComponents) { for (final DecisionComponent component : decisionComponents) { if (!isDRGElementAdded(component)) { createDecisionComponentItem(component); } } } } | DecisionComponents { void createDecisionComponentItems(final List<DecisionComponent> decisionComponents) { for (final DecisionComponent component : decisionComponents) { if (!isDRGElementAdded(component)) { createDecisionComponentItem(component); } } } DecisionComponents(); @Inject DecisionComponents(final View view,
... | DecisionComponents { void createDecisionComponentItems(final List<DecisionComponent> decisionComponents) { for (final DecisionComponent component : decisionComponents) { if (!isDRGElementAdded(component)) { createDecisionComponentItem(component); } } } DecisionComponents(); @Inject DecisionComponents(final View view,
... | DecisionComponents { void createDecisionComponentItems(final List<DecisionComponent> decisionComponents) { for (final DecisionComponent component : decisionComponents) { if (!isDRGElementAdded(component)) { createDecisionComponentItem(component); } } } DecisionComponents(); @Inject DecisionComponents(final View view,
... |
@Test public void testToString() { assertEquals(tested.toString(), CONSTRUCTOR_IDENTIFIER + ":" + CONSTRUCTOR_TYPE + ":" + CONSTRUCTOR_TAGS); assertNotEquals(tested.toString(), CONSTRUCTOR_IDENTIFIER + ":" + CONSTRUCTOR_TYPE + ":" + "[myCustomTag]"); VariableDeclaration comparable = new VariableDeclaration(CONSTRUCTOR_... | @Override public String toString() { String tagsString = ""; if (!Strings.isNullOrEmpty(tags)) { tagsString = ":" + tags; } if (type == null || type.isEmpty()) { return typedIdentifier.getName() + tagsString; } else { return typedIdentifier.getName() + ":" + type + tagsString; } } | VariableDeclaration { @Override public String toString() { String tagsString = ""; if (!Strings.isNullOrEmpty(tags)) { tagsString = ":" + tags; } if (type == null || type.isEmpty()) { return typedIdentifier.getName() + tagsString; } else { return typedIdentifier.getName() + ":" + type + tagsString; } } } | VariableDeclaration { @Override public String toString() { String tagsString = ""; if (!Strings.isNullOrEmpty(tags)) { tagsString = ":" + tags; } if (type == null || type.isEmpty()) { return typedIdentifier.getName() + tagsString; } else { return typedIdentifier.getName() + ":" + type + tagsString; } } VariableDeclarat... | VariableDeclaration { @Override public String toString() { String tagsString = ""; if (!Strings.isNullOrEmpty(tags)) { tagsString = ":" + tags; } if (type == null || type.isEmpty()) { return typedIdentifier.getName() + tagsString; } else { return typedIdentifier.getName() + ":" + type + tagsString; } } VariableDeclarat... | VariableDeclaration { @Override public String toString() { String tagsString = ""; if (!Strings.isNullOrEmpty(tags)) { tagsString = ":" + tags; } if (type == null || type.isEmpty()) { return typedIdentifier.getName() + tagsString; } else { return typedIdentifier.getName() + ":" + type + tagsString; } } VariableDeclarat... |
@Test public void fromString() { AssociationList list = tested.fromString(VALUE); assertEquals(2, list.getInputs().size()); assertEquals(2, list.getOutputs().size()); } | public static AssociationList fromString(String encoded) { return Optional.ofNullable(encoded) .filter(StringUtils::nonEmpty) .map(s -> new AssociationList( Arrays.stream(s.replaceAll(REGEX_DELIMITER, REPLACE_DELIMITER_AVOID_CONFLICTS) .split(REPLACED_DELIMITER)) .map(AssociationDeclaration::fromString) .collect(toList... | AssociationList { public static AssociationList fromString(String encoded) { return Optional.ofNullable(encoded) .filter(StringUtils::nonEmpty) .map(s -> new AssociationList( Arrays.stream(s.replaceAll(REGEX_DELIMITER, REPLACE_DELIMITER_AVOID_CONFLICTS) .split(REPLACED_DELIMITER)) .map(AssociationDeclaration::fromStrin... | AssociationList { public static AssociationList fromString(String encoded) { return Optional.ofNullable(encoded) .filter(StringUtils::nonEmpty) .map(s -> new AssociationList( Arrays.stream(s.replaceAll(REGEX_DELIMITER, REPLACE_DELIMITER_AVOID_CONFLICTS) .split(REPLACED_DELIMITER)) .map(AssociationDeclaration::fromStrin... | AssociationList { public static AssociationList fromString(String encoded) { return Optional.ofNullable(encoded) .filter(StringUtils::nonEmpty) .map(s -> new AssociationList( Arrays.stream(s.replaceAll(REGEX_DELIMITER, REPLACE_DELIMITER_AVOID_CONFLICTS) .split(REPLACED_DELIMITER)) .map(AssociationDeclaration::fromStrin... | AssociationList { public static AssociationList fromString(String encoded) { return Optional.ofNullable(encoded) .filter(StringUtils::nonEmpty) .map(s -> new AssociationList( Arrays.stream(s.replaceAll(REGEX_DELIMITER, REPLACE_DELIMITER_AVOID_CONFLICTS) .split(REPLACED_DELIMITER)) .map(AssociationDeclaration::fromStrin... |
@Test public void setWSDLImports() { final String LOCATION = "location"; final String NAMESPACE = "namespace"; final int QTY = 10; List<WSDLImport> wsdlImports = new ArrayList<>(); for (int i = 0; i < QTY; i++) { wsdlImports.add(new WSDLImport(LOCATION + i, NAMESPACE + i)); } tested.setWSDLImports(wsdlImports); List<Im... | public void setWSDLImports(List<WSDLImport> wsdlImports) { wsdlImports.stream() .map(PropertyWriterUtils::toImport) .forEach(definitions.getImports()::add); } | DefinitionsPropertyWriter { public void setWSDLImports(List<WSDLImport> wsdlImports) { wsdlImports.stream() .map(PropertyWriterUtils::toImport) .forEach(definitions.getImports()::add); } } | DefinitionsPropertyWriter { public void setWSDLImports(List<WSDLImport> wsdlImports) { wsdlImports.stream() .map(PropertyWriterUtils::toImport) .forEach(definitions.getImports()::add); } DefinitionsPropertyWriter(Definitions definitions); } | DefinitionsPropertyWriter { public void setWSDLImports(List<WSDLImport> wsdlImports) { wsdlImports.stream() .map(PropertyWriterUtils::toImport) .forEach(definitions.getImports()::add); } DefinitionsPropertyWriter(Definitions definitions); void setExporter(String exporter); void setExporterVersion(String version); void ... | DefinitionsPropertyWriter { public void setWSDLImports(List<WSDLImport> wsdlImports) { wsdlImports.stream() .map(PropertyWriterUtils::toImport) .forEach(definitions.getImports()::add); } DefinitionsPropertyWriter(Definitions definitions); void setExporter(String exporter); void setExporterVersion(String version); void ... |
@Test public void testSetCase_true() throws Exception { tested.setCase(Boolean.TRUE); assertTrue(CustomElement.isCase.of(tested.getFlowElement()).get()); } | public void setCase(Boolean isCase) { CustomElement.isCase.of(flowElement).set(isCase); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setCase(Boolean isCase) { CustomElement.isCase.of(flowElement).set(isCase); } } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setCase(Boolean isCase) { CustomElement.isCase.of(flowElement).set(isCase); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setCase(Boolean isCase) { CustomElement.isCase.of(flowElement).set(isCase); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEntryAction onEntryAc... | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setCase(Boolean isCase) { CustomElement.isCase.of(flowElement).set(isCase); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEntryAction onEntryAc... |
@Test public void testSetCase_false() throws Exception { tested.setCase(Boolean.FALSE); assertFalse(CustomElement.isCase.of(tested.getFlowElement()).get()); } | public void setCase(Boolean isCase) { CustomElement.isCase.of(flowElement).set(isCase); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setCase(Boolean isCase) { CustomElement.isCase.of(flowElement).set(isCase); } } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setCase(Boolean isCase) { CustomElement.isCase.of(flowElement).set(isCase); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setCase(Boolean isCase) { CustomElement.isCase.of(flowElement).set(isCase); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEntryAction onEntryAc... | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setCase(Boolean isCase) { CustomElement.isCase.of(flowElement).set(isCase); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEntryAction onEntryAc... |
@Test public void testSetAdHocAutostart_true() throws Exception { tested.setAdHocAutostart(Boolean.TRUE); assertTrue(CustomElement.autoStart.of(tested.getFlowElement()).get()); } | public void setAdHocAutostart(boolean autoStart) { CustomElement.autoStart.of(flowElement).set(autoStart); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAdHocAutostart(boolean autoStart) { CustomElement.autoStart.of(flowElement).set(autoStart); } } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAdHocAutostart(boolean autoStart) { CustomElement.autoStart.of(flowElement).set(autoStart); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAdHocAutostart(boolean autoStart) { CustomElement.autoStart.of(flowElement).set(autoStart); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEn... | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAdHocAutostart(boolean autoStart) { CustomElement.autoStart.of(flowElement).set(autoStart); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEn... |
@Test public void testSetAdHocAutostart_false() throws Exception { tested.setAdHocAutostart(Boolean.FALSE); assertFalse(CustomElement.autoStart.of(tested.getFlowElement()).get()); } | public void setAdHocAutostart(boolean autoStart) { CustomElement.autoStart.of(flowElement).set(autoStart); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAdHocAutostart(boolean autoStart) { CustomElement.autoStart.of(flowElement).set(autoStart); } } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAdHocAutostart(boolean autoStart) { CustomElement.autoStart.of(flowElement).set(autoStart); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAdHocAutostart(boolean autoStart) { CustomElement.autoStart.of(flowElement).set(autoStart); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEn... | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAdHocAutostart(boolean autoStart) { CustomElement.autoStart.of(flowElement).set(autoStart); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEn... |
@Test public void testAbortParentTrue() { tested.setAbortParent(true); } | public void setAbortParent(Boolean abortParent) { CustomElement.abortParent.of(activity).set(abortParent); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAbortParent(Boolean abortParent) { CustomElement.abortParent.of(activity).set(abortParent); } } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAbortParent(Boolean abortParent) { CustomElement.abortParent.of(activity).set(abortParent); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAbortParent(Boolean abortParent) { CustomElement.abortParent.of(activity).set(abortParent); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEn... | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAbortParent(Boolean abortParent) { CustomElement.abortParent.of(activity).set(abortParent); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEn... |
@Test public void testAbortParentFalse() { tested.setAbortParent(false); } | public void setAbortParent(Boolean abortParent) { CustomElement.abortParent.of(activity).set(abortParent); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAbortParent(Boolean abortParent) { CustomElement.abortParent.of(activity).set(abortParent); } } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAbortParent(Boolean abortParent) { CustomElement.abortParent.of(activity).set(abortParent); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAbortParent(Boolean abortParent) { CustomElement.abortParent.of(activity).set(abortParent); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEn... | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAbortParent(Boolean abortParent) { CustomElement.abortParent.of(activity).set(abortParent); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEn... |
@Test public void testSetIsAsync() { tested.setAsync(Boolean.TRUE); assertTrue(CustomElement.async.of(tested.getFlowElement()).get()); } | public void setAsync(Boolean async) { CustomElement.async.of(activity).set(async); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAsync(Boolean async) { CustomElement.async.of(activity).set(async); } } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAsync(Boolean async) { CustomElement.async.of(activity).set(async); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); } | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAsync(Boolean async) { CustomElement.async.of(activity).set(async); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEntryAction onEntryAction)... | CallActivityPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setAsync(Boolean async) { CustomElement.async.of(activity).set(async); } CallActivityPropertyWriter(CallActivity activity, VariableScope variableScope, Set<DataObject> dataObjects); void setOnEntryAction(OnEntryAction onEntryAction)... |
@Test public void testInit() { final JQuerySelectPicker selectPicker = mock(JQuerySelectPicker.class); final CallbackFunction callback = mock(CallbackFunction.class); final String placeholder = "placeholder"; doReturn(selectPicker).when(view).getDrgElementFilter(); when(view.onDrgElementFilterChange()).thenReturn(callb... | @PostConstruct public void init() { getDrgElementFilter().selectpicker("refresh"); getDrgElementFilter().on("hidden.bs.select", onDrgElementFilterChange()); setupTermFilterPlaceholder(); } | DecisionComponentsView implements DecisionComponents.View { @PostConstruct public void init() { getDrgElementFilter().selectpicker("refresh"); getDrgElementFilter().on("hidden.bs.select", onDrgElementFilterChange()); setupTermFilterPlaceholder(); } } | DecisionComponentsView implements DecisionComponents.View { @PostConstruct public void init() { getDrgElementFilter().selectpicker("refresh"); getDrgElementFilter().on("hidden.bs.select", onDrgElementFilterChange()); setupTermFilterPlaceholder(); } @Inject DecisionComponentsView(final HTMLSelectElement drgElementFilte... | DecisionComponentsView implements DecisionComponents.View { @PostConstruct public void init() { getDrgElementFilter().selectpicker("refresh"); getDrgElementFilter().on("hidden.bs.select", onDrgElementFilterChange()); setupTermFilterPlaceholder(); } @Inject DecisionComponentsView(final HTMLSelectElement drgElementFilte... | DecisionComponentsView implements DecisionComponents.View { @PostConstruct public void init() { getDrgElementFilter().selectpicker("refresh"); getDrgElementFilter().on("hidden.bs.select", onDrgElementFilterChange()); setupTermFilterPlaceholder(); } @Inject DecisionComponentsView(final HTMLSelectElement drgElementFilte... |
@Test public void testGetNodesFromImports() { final Path path = mock(Path.class); final DMNIncludedModel includedModel1 = mock(DMNIncludedModel.class); final DMNIncludedModel includedModel2 = mock(DMNIncludedModel.class); final DMNIncludedModel includedModel3 = mock(DMNIncludedModel.class); final List<DMNIncludedModel>... | public List<DMNIncludedNode> getNodesFromImports(final Path path, final List<DMNIncludedModel> includedModels) { try { final Diagram<Graph, Metadata> diagram = diagramHelper.getDiagramByPath(path); final Optional<DMNIncludedModel> diagramImport = getDiagramImport(diagram, includedModels); return diagramImport .map(dmn ... | DMNIncludedNodesFilter { public List<DMNIncludedNode> getNodesFromImports(final Path path, final List<DMNIncludedModel> includedModels) { try { final Diagram<Graph, Metadata> diagram = diagramHelper.getDiagramByPath(path); final Optional<DMNIncludedModel> diagramImport = getDiagramImport(diagram, includedModels); retur... | DMNIncludedNodesFilter { public List<DMNIncludedNode> getNodesFromImports(final Path path, final List<DMNIncludedModel> includedModels) { try { final Diagram<Graph, Metadata> diagram = diagramHelper.getDiagramByPath(path); final Optional<DMNIncludedModel> diagramImport = getDiagramImport(diagram, includedModels); retur... | DMNIncludedNodesFilter { public List<DMNIncludedNode> getNodesFromImports(final Path path, final List<DMNIncludedModel> includedModels) { try { final Diagram<Graph, Metadata> diagram = diagramHelper.getDiagramByPath(path); final Optional<DMNIncludedModel> diagramImport = getDiagramImport(diagram, includedModels); retur... | DMNIncludedNodesFilter { public List<DMNIncludedNode> getNodesFromImports(final Path path, final List<DMNIncludedModel> includedModels) { try { final Diagram<Graph, Metadata> diagram = diagramHelper.getDiagramByPath(path); final Optional<DMNIncludedModel> diagramImport = getDiagramImport(diagram, includedModels); retur... |
@Test public void testGetProjectContent() { final String defSetId = "defSetId"; final String expectedContent = "<xml/>"; final String moduleName = "moduleName"; final Package aPackage = mock(Package.class); final KieModule kieModule = mock(KieModule.class); final Overview overview = mock(Overview.class); doReturn(expec... | @Override public DMNContentResource getProjectContent(final Path path, final String defSetId) { final String content = getSource(path); final String title = path.getFileName(); final ProjectMetadata metadata = buildMetadataInstance(path, defSetId, title); return new DMNContentResource(content, metadata); } | DMNContentServiceImpl extends KieService<String> implements DMNContentService { @Override public DMNContentResource getProjectContent(final Path path, final String defSetId) { final String content = getSource(path); final String title = path.getFileName(); final ProjectMetadata metadata = buildMetadataInstance(path, de... | DMNContentServiceImpl extends KieService<String> implements DMNContentService { @Override public DMNContentResource getProjectContent(final Path path, final String defSetId) { final String content = getSource(path); final String title = path.getFileName(); final ProjectMetadata metadata = buildMetadataInstance(path, de... | DMNContentServiceImpl extends KieService<String> implements DMNContentService { @Override public DMNContentResource getProjectContent(final Path path, final String defSetId) { final String content = getSource(path); final String title = path.getFileName(); final ProjectMetadata metadata = buildMetadataInstance(path, de... | DMNContentServiceImpl extends KieService<String> implements DMNContentService { @Override public DMNContentResource getProjectContent(final Path path, final String defSetId) { final String content = getSource(path); final String title = path.getFileName(); final ProjectMetadata metadata = buildMetadataInstance(path, de... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.