KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.jbpm.bpel.xml;
2
3 import org.jbpm.bpel.def.Receive;
4 /**
5  * @author Juan Cantú
6  * @version $Revision: 1.4 $ $Date: 2005/04/27 20:52:25 $
7  */

8 public class ReceiveReaderTest extends AbstractReaderTestCase {
9   
10   public void setUp() throws Exception JavaDoc {
11     super.setUp();
12     initMessageProperties();
13   }
14   
15   public void testCreateInstanceYes() throws Exception JavaDoc {
16     String JavaDoc xml =
17       "<receive partnerLink='aPartner' operation='o' variable='iv'" +
18       " createInstance='yes'/>";
19     
20     Receive receive = (Receive) readActivity(xml);
21     assertEquals(true, receive.isCreateInstance());
22   }
23   
24   public void testCreateInstanceNo() throws Exception JavaDoc {
25     String JavaDoc xml =
26       "<receive partnerLink='aPartner' operation='o' variable='iv'" +
27       " createInstance='no'/>";
28     
29     Receive receive = (Receive) readActivity(xml);
30     assertEquals(false, receive.isCreateInstance());
31   }
32   
33   public void testCreateInstanceDefault() throws Exception JavaDoc {
34     String JavaDoc xml = "<receive partnerLink='aPartner' operation='o' variable='iv'/>";
35     
36     Receive receive = (Receive) readActivity(xml);
37     assertEquals(false, receive.isCreateInstance());
38   }
39 }
40
Popular Tags