//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testBpmnPane() public virtual void testBpmnPane() { DiagramElement diagramElement = collaboration.DiagramElement; assertThat(diagramElement).NotNull.isInstanceOf(typeof(BpmnPlane)); BpmnPlane bpmnPlane = (BpmnPlane)diagramElement; assertThat(bpmnPlane.BpmnElement).isEqualTo(collaboration); assertThat(bpmnPlane.getChildElementsByType(typeof(DiagramElement))).NotEmpty; }
public void BPMNPlane_Populate() { BpmnPlane plane = new BpmnPlane { BpmnElement = XmlQualifiedName.Empty, DiagramElements = new BpmnEdge[0] { } }; Assert.NotNull(plane.BpmnElement); Assert.NotNull(plane.DiagramElements); }
public virtual BpmnEdge createEdge(BaseElement baseElement) { BpmnPlane bpmnPlane = findBpmnPlane(); if (bpmnPlane != null) { BpmnEdge edge = createInstance(typeof(BpmnEdge)); edge.BpmnElement = baseElement; Waypoints = edge; bpmnPlane.addChildElement(edge); return(edge); } return(null); }
public virtual BpmnShape createBpmnShape(FlowNode node) { BpmnPlane bpmnPlane = findBpmnPlane(); if (bpmnPlane != null) { BpmnShape bpmnShape = createInstance(typeof(BpmnShape)); bpmnShape.BpmnElement = node; Bounds nodeBounds = createInstance(typeof(Bounds)); if (node is SubProcess) { bpmnShape.Expanded = true; nodeBounds.setWidth(350); nodeBounds.setHeight(200); } else if (node is Activity) { nodeBounds.setWidth(100); nodeBounds.setHeight(80); } else if (node is Event) { nodeBounds.setWidth(36); nodeBounds.setHeight(36); } else if (node is Gateway) { nodeBounds.setWidth(50); nodeBounds.setHeight(50); if (node is ExclusiveGateway) { bpmnShape.MarkerVisible = true; } } nodeBounds.setX(0); nodeBounds.setY(0); bpmnShape.addChildElement(nodeBounds); bpmnPlane.addChildElement(bpmnShape); return(bpmnShape); } return(null); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldCreateValidBpmnDi() public virtual void shouldCreateValidBpmnDi() { modelInstance = Bpmn.createProcess("process").startEvent("start").sequenceFlowId("flow").endEvent("end").done(); process = modelInstance.getModelElementById("process"); startEvent = modelInstance.getModelElementById("start"); sequenceFlow = modelInstance.getModelElementById("flow"); endEvent = modelInstance.getModelElementById("end"); // create bpmn diagram BpmnDiagram bpmnDiagram = modelInstance.newInstance(typeof(BpmnDiagram)); bpmnDiagram.Id = "diagram"; bpmnDiagram.Name = "diagram"; bpmnDiagram.Documentation = "bpmn diagram element"; bpmnDiagram.Resolution = 120.0; modelInstance.Definitions.addChildElement(bpmnDiagram); // create plane for process BpmnPlane processPlane = modelInstance.newInstance(typeof(BpmnPlane)); processPlane.Id = "plane"; processPlane.BpmnElement = process; bpmnDiagram.BpmnPlane = processPlane; // create shape for start event BpmnShape startEventShape = modelInstance.newInstance(typeof(BpmnShape)); startEventShape.Id = "startShape"; startEventShape.BpmnElement = startEvent; processPlane.DiagramElements.Add(startEventShape); // create bounds for start event shape Bounds startEventBounds = modelInstance.newInstance(typeof(Bounds)); startEventBounds.setHeight(36.0); startEventBounds.setWidth(36.0); startEventBounds.setX(632.0); startEventBounds.setY(312.0); startEventShape.Bounds = startEventBounds; // create shape for end event BpmnShape endEventShape = modelInstance.newInstance(typeof(BpmnShape)); endEventShape.Id = "endShape"; endEventShape.BpmnElement = endEvent; processPlane.DiagramElements.Add(endEventShape); // create bounds for end event shape Bounds endEventBounds = modelInstance.newInstance(typeof(Bounds)); endEventBounds.setHeight(36.0); endEventBounds.setWidth(36.0); endEventBounds.setX(718.0); endEventBounds.setY(312.0); endEventShape.Bounds = endEventBounds; // create edge for sequence flow BpmnEdge flowEdge = modelInstance.newInstance(typeof(BpmnEdge)); flowEdge.Id = "flowEdge"; flowEdge.BpmnElement = sequenceFlow; flowEdge.SourceElement = startEventShape; flowEdge.TargetElement = endEventShape; processPlane.DiagramElements.Add(flowEdge); // create waypoints for sequence flow edge Waypoint startWaypoint = modelInstance.newInstance(typeof(Waypoint)); startWaypoint.X = 668.0; startWaypoint.Y = 330.0; flowEdge.Waypoints.add(startWaypoint); Waypoint endWaypoint = modelInstance.newInstance(typeof(Waypoint)); endWaypoint.X = 718.0; endWaypoint.Y = 330.0; flowEdge.Waypoints.add(endWaypoint); }