1 package org.jacorb.test.bugs.bug228; 2 3 22 23 import junit.framework.*; 24 25 import org.omg.CORBA.*; 26 27 35 public class TestCase extends junit.framework.TestCase 36 { 37 public TestCase(String name) 38 { 39 super(name); 40 } 41 42 public static Test suite() 43 { 44 TestSuite suite = new TestSuite ("bug 228 valuetype factories in helper"); 45 suite.addTest (new TestCase ("testFactories")); 46 return suite; 47 } 48 49 public void testFactories() 50 { 51 ORB orb = org.omg.CORBA.ORB.init (new String []{}, null); 52 53 Sample s = SampleHelper.init_1 (orb); 54 assertNotNull(s); 55 56 s = SampleHelper.init_2 (orb, 1, 2.0, "blabla"); 57 assertNotNull(s); 58 assertEquals (1, s.alpha); 59 assertEquals (2.0, s.beta, 0.0); 60 assertEquals ("blabla", s.gamma); 61 } 62 63 public static void main(String [] args) 64 { 65 junit.textui.TestRunner.run(TestCase.class); 66 } 67 68 } 69 | Popular Tags |