User: ejort Date: 02/03/17 04:56:29 Added: src/main/org/jboss/test/naming/test EjbLinkUnitTestCase.java Log: ejb-link test for an ear Revision Changes Path 1.1 jbosstest/src/main/org/jboss/test/naming/test/EjbLinkUnitTestCase.java Index: EjbLinkUnitTestCase.java =================================================================== /* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. * See terms of license at gnu.org. */ package org.jboss.test.naming.test; import javax.naming.InitialContext; import javax.rmi.PortableRemoteObject; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.jboss.test.JBossTestCase; import org.jboss.test.naming.interfaces.TestEjbLinkHome; import org.jboss.test.naming.interfaces.TestEjbLink; /** * Tests of EjbLink. * * @author <a href="mailto:[EMAIL PROTECTED]">Adrian Brock</a> */ public class EjbLinkUnitTestCase extends JBossTestCase { /** * Constructor for the test * * @param name Testcase name */ public EjbLinkUnitTestCase(String name) { super(name); } /** * Test an ejblink * * @exception Exception Description of Exception */ public void testEjbLinkNamed() throws Exception { Object obj = getInitialContext().lookup("naming/SessionB"); obj = PortableRemoteObject.narrow(obj, TestEjbLinkHome.class); TestEjbLinkHome home = (TestEjbLinkHome)obj; getLog().debug("Found naming/SessionB"); TestEjbLink bean = home.create(); getLog().debug("Created the bean"); assertEquals("Works", bean.testEjbLinkCaller("java:comp/env/ejb/SessionA")); getLog().debug("Test succeeded"); bean.remove(); } public static Test suite() throws Exception { return getDeploySetup(EjbLinkUnitTestCase.class, "naming.ear"); } }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development