assertEquals("hertransition", element.attributeValue("name"));
}
public void testTransitionOrder() throws Exception {
ProcessDefinition processDefinition = new ProcessDefinition();
Node a = new Node("a");
Node b = new Node("b");
processDefinition.addNode(a);
processDefinition.addNode(b);
Transition t = new Transition("one");
a.addLeavingTransition(t);
b.addArrivingTransition(t);
t = new Transition("two");
a.addLeavingTransition(t);
b.addArrivingTransition(t);
t = new Transition("three");
a.addLeavingTransition(t);
b.addArrivingTransition(t);
Element element = AbstractXmlTestCase.toXmlAndParse( processDefinition );
assertNotNull(element);
assertEquals( "one", ((Element)element.selectSingleNode("/process-definition/node[1]/transition[1]")).attributeValue("name"));
assertEquals( "two", ((Element)element.selectSingleNode("/process-definition/node[1]/transition[2]")).attributeValue("name"));