1 package org.jbpm.bpel.xml; 2 3 import javax.xml.namespace.QName ; 4 5 import org.jbpm.bpel.data.def.VariableDefinition; 6 import org.jbpm.bpel.def.Throw; 7 8 12 public class ThrowReaderTest extends AbstractReaderTestCase { 13 14 public void testFaultName() throws Exception { 15 String xml ="<throw faultName='fn'/>"; 16 Throw throwActivity = (Throw) readActivity(xml); 17 assertEquals(new QName ("fn"), throwActivity.getFaultName()); 18 } 19 20 public void testFaultVariable() throws Exception { 21 VariableDefinition variable = new VariableDefinition(); 22 variable.setName("fv"); 23 scope.addVariable(variable); 24 25 String xml ="<throw faultName='fn' faultVariable='fv'/>"; 26 27 Throw throwActivity = (Throw) readActivity(xml); 28 assertEquals( "fv", throwActivity.getFaultVariable().getName() ); 29 } 30 } 31 | Popular Tags |