1 package org.jbpm.bpel.xml; 2 3 import org.jbpm.bpel.def.Activity; 4 import org.jbpm.bpel.def.While; 5 6 10 public class WhileReaderTest extends AbstractReaderTestCase { 11 12 public void testActivity() throws Exception { 13 String xml = 14 "<while>" + 15 "<condition>$c</condition>" + 16 " <empty name='whileActivity'/>" + 17 "</while>"; 18 While whileBlock = (While) readActivity(xml); 19 Activity activity = (Activity) whileBlock.getNode("whileActivity"); 20 assertNotNull(activity); 21 assertEquals(whileBlock, activity.getCompositeActivity()); 22 } 23 24 public void testCondition() throws Exception { 25 String xml = 26 "<while>" + 27 "<condition>$c</condition>" + 28 " <empty name='first'/>" + 29 "</while>"; 30 While whileBlock = (While) readActivity(xml); 31 assertEquals("$c", whileBlock.getCondition().getText()); 32 } 33 } 34 | Popular Tags |