1 22 package org.jboss.ejb3.test.ejbthree712.unit; 23 24 import junit.framework.Test; 25 26 import org.jboss.ejb3.test.ejbthree712.InjectionTester; 27 import org.jboss.test.JBossTestCase; 28 29 35 public class InjectionTesterUnitTestCase extends JBossTestCase 36 { 37 38 public InjectionTesterUnitTestCase(String name) 39 { 40 super(name); 41 } 42 43 public void testInjection() throws Exception 44 { 45 InjectionTester session = (InjectionTester) getInitialContext().lookup("InjectionTesterBean/remote"); 46 try 47 { 48 session.checkInjection(); 49 } 50 catch(InjectionTester.FailedException e) 51 { 52 fail("SessionContext not injected"); 53 } 54 } 55 56 public static Test suite() throws Exception 57 { 58 return getDeploySetup(InjectionTesterUnitTestCase.class, "ejbthree712.jar"); 59 } 60 } 61 | Popular Tags |