1 16 package org.apache.naming; 17 18 import java.util.Hashtable ; 19 20 import javax.naming.Context ; 21 import javax.naming.InitialContext ; 22 23 import junit.framework.Test; 24 import junit.framework.TestSuite; 25 import junit.textui.TestRunner; 26 27 28 33 public class NamingContextTest extends AbstractContextTest { 34 35 public NamingContextTest(String name) { 36 super(name); 37 } 38 39 public static void main(String [] args) { 40 TestRunner.run(suite()); 41 } 42 43 public static Test suite() { 44 TestSuite suite = new TestSuite(NamingContextTest.class); 45 suite.setName("Selector Context Tests"); 46 return suite; 47 } 48 49 protected Context makeInitialContext() { 50 try { 51 System.setProperty(Context.INITIAL_CONTEXT_FACTORY, 52 "org.apache.naming.NamingContextFactory"); 53 return new InitialContext (new Hashtable ()); 54 } catch (Exception ex) { 55 fail("Failed to create NamingContext"); 56 } 57 return null; 58 } 59 60 protected boolean isGetNameInNamespaceSupported() { 61 return false; 62 } 63 } 64 | Popular Tags |