Пример #1
0
 @Test
 public void TestRemoveNodeFromCluster() {
   BPMNModel m = new BPMNModel();
   Task task1 = new Task(100, 100, "Task1");
   m.addNode(task1);
   Pool pool = new Pool(50, 50, "Pool");
   m.addNode(pool);
   pool.addProcessNode(task1);
   m.removeNode(task1);
   assertFalse(pool.getProcessNodes().contains(task1));
 }
Пример #2
0
 @Test
 public void TestRemovalOfEdgeConnectedToEdgeDocker() {
   BPMNModel m = new BPMNModel();
   Task task1 = new Task(100, 100, "Task1");
   m.addNode(task1);
   Task task2 = new Task(100, 200, "Task2");
   m.addNode(task2);
   DataObject data = new DataObject(300, 300, "DataObject");
   m.addNode(data);
   ProcessEdge edge1 = new SequenceFlow(task1, task2);
   m.addEdge(edge1);
   EdgeDocker edgeDocker = new EdgeDocker(edge1);
   m.addNode(edgeDocker);
   ProcessEdge edge2 = new Association(edgeDocker, data);
   m.addEdge(edge2);
   m.removeObject(edge2);
   m.removeNode(data);
   assertFalse(m.getNodes().contains(edgeDocker));
   assertFalse(m.getEdges().contains(edge2));
   assertFalse(m.getNodes().contains(data));
 }