1 package org.sapia.soto; 2 3 import javax.naming.Context ; 4 5 import org.sapia.soto.config.JndiRef; 6 import org.sapia.soto.util.Param; 7 8 import junit.framework.TestCase; 9 10 19 public class JndiRefTest extends TestCase{ 20 21 public JndiRefTest(String name){ 22 super(name); 23 } 24 25 public void testOnCreate() throws Exception { 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 |