KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > bpel > xml > SequenceReaderTest


1 package org.jbpm.bpel.xml;
2
3 import org.jbpm.bpel.def.Activity;
4 import org.jbpm.bpel.def.Sequence;
5
6 /**
7  * @author Juan Cantú
8  * @version $Revision: 1.1 $ $Date: 2005/04/08 18:36:58 $
9  */

10 public class SequenceReaderTest extends AbstractReaderTestCase {
11   
12   public void testActivities() throws Exception JavaDoc {
13     String JavaDoc xml =
14       "<sequence>" +
15       " <empty name='first'/>" +
16       " <empty name='second'/>" +
17       "</sequence>";
18     Sequence sequence = (Sequence) readActivity(xml);
19     Activity first = (Activity) sequence.getNode("first");
20     assertNotNull(first);
21     assertEquals(sequence, first.getCompositeActivity());
22     Activity second = (Activity) sequence.getNode("second");
23     assertNotNull(second);
24     assertEquals(sequence, second.getCompositeActivity());
25   }
26 }
27
Popular Tags