KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > soto > IncludeTest


1 package org.sapia.soto;
2
3 import junit.framework.TestCase;
4
5 import org.sapia.soto.examples.MasterService;
6
7 import java.util.HashMap JavaDoc;
8 import java.util.Map JavaDoc;
9
10
11 /**
12  * @author Yanick Duchesne
13   * <dl>
14  * <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>
15  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
16  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
17  * </dl>
18  */

19 public class IncludeTest extends TestCase {
20   /**
21    * Constructor for IncludeTest.
22    */

23   public IncludeTest(String JavaDoc test) {
24     super(test);
25   }
26
27   public void testIncludeRelativeResource() throws Exception JavaDoc {
28     SotoContainer cont = new SotoContainer();
29     Map JavaDoc props = new HashMap JavaDoc();
30     props.put("serviceName", "secondaryRelativeResource");
31     cont.load("org/sapia/soto/includeRelativeResource.xml", props);
32   }
33
34   public void testIncludeAbsoluteFile() throws Exception JavaDoc {
35     SotoContainer cont = new SotoContainer();
36     Map JavaDoc props = new HashMap JavaDoc();
37     props.put("serviceName", "secondaryAbsoluteFile");
38     cont.load("org/sapia/soto/includeAbsoluteFile.xml", props);
39   }
40
41   public void testIncludeAbsoluteResource() throws Exception JavaDoc {
42     SotoContainer cont = new SotoContainer();
43     Map JavaDoc props = new HashMap JavaDoc();
44     props.put("serviceName", "secondaryAbsoluteResource");
45     cont.load("org/sapia/soto/includeAbsoluteResource.xml", props);
46   }
47
48   public void testIncludeParametrizedResource() throws Exception JavaDoc {
49     SotoContainer cont = new SotoContainer();
50     cont.load("org/sapia/soto/includeParamResource.xml");
51
52     MasterService svc = (MasterService) cont.lookup("master");
53     super.assertEquals("included", svc.getMessage());
54   }
55 }
56
Popular Tags