1 package org.jacorb.test.orb; 2 3 22 23 import junit.framework.*; 24 import junit.extensions.TestSetup; 25 import org.jacorb.test.common.ORBSetup; 26 import org.jacorb.orb.ParsedIOR; 27 import org.omg.IIOP.ProfileBody_1_1; 28 29 30 36 public class ORBInitTest extends TestCase 37 { 38 43 public ORBInitTest (String name) 44 { 45 super (name); 46 } 47 48 49 54 public static Test suite () 55 { 56 TestSuite suite = new TestSuite ("ORBInit Test"); 57 58 suite.addTest (new ORBInitTest ("testParse1")); 59 suite.addTest (new ORBInitTest ("testParse2")); 60 61 return suite; 62 } 63 64 65 68 public void testParse1 () 69 { 70 String args[] = new String [3]; 71 args[0] = "-ORBInitRef"; 72 args[1] = "NameService"; 73 args[2] = "foo.ior"; 74 75 try 76 { 77 org.omg.CORBA.ORB orbtest = org.omg.CORBA.ORB.init( args, null ); 78 } 79 catch (org.omg.CORBA.BAD_PARAM e ) 80 { 81 return; 83 } 84 catch (Exception e ) 85 { 86 fail( "Incorrect exception " + e); 87 } 88 fail( "No exception"); 89 } 90 91 92 95 public void testParse2 () 96 { 97 String args[] = new String [2]; 98 args[0] = "-ORBInitRef"; 99 args[1] = "NameService=foo.ior"; 100 101 try 102 { 103 org.omg.CORBA.ORB orbtest = org.omg.CORBA.ORB.init( args, null ); 104 } 105 catch (Exception e ) 106 { 107 fail( "Incorrect exception " + e); 108 } 109 } 110 } 111 | Popular Tags |