KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.sapia.soto;
2
3 import javax.naming.Context JavaDoc;
4
5 import org.sapia.soto.config.JndiRef;
6 import org.sapia.soto.util.Param;
7
8 import junit.framework.TestCase;
9
10 /**
11  * @author Yanick Duchesne
12  *
13  * <dl>
14  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2004 <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 JndiRefTest extends TestCase{
20     
21     public JndiRefTest(String JavaDoc name){
22         super(name);
23     }
24     
25     public void testOnCreate() throws Exception JavaDoc{
26         JndiRef ref = new JndiRef();
27         ref.setName("foo");
28         Param p = ref.createProperty();
29         p.setName(Context.INITIAL_CONTEXT_FACTORY);
30         p.setValue(TestInitialContextFactory.class.getName());
31         ref.onCreate();
32     }
33
34 }
35
Popular Tags