KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > soto > state > ConfigTest


1 package org.sapia.soto.state;
2
3 import junit.framework.TestCase;
4
5 import org.sapia.soto.SotoContainer;
6
7
8 /**
9  * @author Yanick Duchesne
10  * <dl>
11  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
12  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
13  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
14  * </dl>
15  */

16 public class ConfigTest extends TestCase {
17   public ConfigTest(String JavaDoc name) {
18     super(name);
19   }
20
21   public void testLoad() throws Exception JavaDoc {
22     SotoContainer cont = new SotoContainer();
23     cont.load("org/sapia/soto/state/stateLoadTest.xml");
24     cont.start();
25
26     ContextImpl ctx = new ContextImpl();
27     MapScope scope = new MapScope();
28     ctx.addScope("request", scope);
29     scope.put("key", "value");
30
31     StateMachineService svc = (StateMachineService) cont.lookup("test");
32     svc.execute("state1", null, ctx);
33   }
34 }
35
Popular Tags