1 22 package org.jboss.ejb3.test.interceptors.unit; 23 24 import java.util.ArrayList ; 25 26 import org.jboss.ejb3.test.interceptors.MySessionRemote; 27 import org.jboss.test.JBossTestCase; 28 import junit.framework.Test; 29 30 36 37 public class RemoteUnitTestCase 38 extends JBossTestCase 39 { 40 org.jboss.logging.Logger log = getLog(); 41 42 static boolean deployed = false; 43 static int test = 0; 44 45 public RemoteUnitTestCase(String name) 46 { 47 48 super(name); 49 50 } 51 52 public void testInjection() throws Exception 53 { 54 MySessionRemote test = (MySessionRemote) getInitialContext().lookup("MySessionBean/remote"); 55 ArrayList list = test.doit(); 56 assertEquals("MyBaseInterceptor", list.get(0)); 57 assertEquals("MyInterceptor", list.get(1)); 58 } 59 60 public static Test suite() throws Exception 61 { 62 return getDeploySetup(RemoteUnitTestCase.class, "interceptors-test.jar"); 63 } 64 65 } 66 | Popular Tags |