1 22 package org.jboss.ejb3.test.naming.unit; 23 24 import junit.framework.Test; 25 import junit.framework.TestSuite; 26 27 import org.jboss.logging.Logger; 28 import org.jboss.test.JBossTestCase; 29 30 import org.jboss.ejb3.test.naming.Stateful; 31 32 36 public class NamingTestCase extends JBossTestCase 37 { 38 private static final Logger log = Logger.getLogger(NamingTestCase.class); 39 40 45 public NamingTestCase(String name) 46 { 47 super(name); 48 } 49 50 public void testJndiOverride() throws Exception 51 { 52 Stateful stateful = (Stateful)getInitialContext().lookup("StatefulOverride"); 53 assertNotNull(stateful); 54 55 try 56 { 57 stateful = (Stateful)getInitialContext().lookup("Stateful"); 58 fail(); 59 } catch (javax.naming.NamingException e) 60 { 61 62 } 63 } 64 65 public static Test suite() throws Exception 66 { 67 return getDeploySetup(NamingTestCase.class, "naming-test.jar"); 68 } 69 70 } 71 | Popular Tags |