1 25 26 package org.objectweb.jonas.jtests.clients.entity; 27 28 import javax.naming.NamingException ; 29 import javax.rmi.PortableRemoteObject ; 30 31 import junit.framework.Test; 32 import junit.framework.TestSuite; 33 34 import org.objectweb.jonas.jtests.beans.ebasic.SimpleHome; 35 36 37 43 public class G_BasicHomeInterfaceEB extends B_BasicHomeInterface { 44 45 private static String BEAN_HOME = "ebasicSimpleEBHome"; 46 47 public G_BasicHomeInterfaceEB(String name) { 48 super(name); 49 } 50 51 public void testEmpty() throws Exception { 52 } 53 54 public SimpleHome getHome() { 55 if (home == null) { 56 try { 57 home = (SimpleHome) PortableRemoteObject.narrow(ictx.lookup(BEAN_HOME), SimpleHome.class); 58 } catch (NamingException e) { 59 fail("Cannot get bean home"); 60 } 61 } 62 return home; 63 } 64 65 68 public static Test suite() { 69 return new TestSuite(G_BasicHomeInterfaceEB.class); 70 } 71 72 73 public static void main (String args[]) throws Exception { 74 String testtorun = null; 75 for (int argn = 0; argn < args.length; argn++) { 77 String s_arg = args[argn]; 78 Integer i_arg; 79 if (s_arg.equals("-n")) { 80 testtorun = args[++argn]; 81 } 82 } 83 if (testtorun == null) { 84 junit.textui.TestRunner.run(suite()); 85 } else { 86 87 junit.textui.TestRunner.run(new G_BasicHomeInterfaceEB(testtorun)); 88 } 89 90 } 91 } 92 | Popular Tags |