1 package org.jacorb.test.bugs.bug351; 2 3 22 23 import junit.framework.*; 24 25 import org.jacorb.test.common.*; 26 27 33 public class TestCase extends ClientServerTestCase 34 { 35 private ValueServer server = null; 36 37 public TestCase (String name, ClientServerSetup setup) 38 { 39 super (name, setup); 40 } 41 42 public void setUp() 43 { 44 server = (ValueServer)ValueServerHelper.narrow(setup.getServerObject()); 45 } 46 47 public static Test suite() 48 { 49 TestSuite suite = new TestSuite( "bug 351 complex valuetype" ); 50 ClientServerSetup setup = 51 new ClientServerSetup( suite, 52 "org.jacorb.test.bugs.bug351.ValueServerImpl" ); 53 54 suite.addTest( new TestCase( "testBug", setup )); 55 56 return setup; 57 } 58 59 public void testBug() 60 { 61 RetrievalResult result = server.search(); 62 assertTrue (result != null); 63 float[] scores = result.getScores(); 64 assertEquals (1.2f, scores[0], 0.0f); 65 assertEquals (3.4f, scores[1], 0.0f); 66 assertEquals (5.6f, scores[2], 0.0f); 67 } 68 } 69 | Popular Tags |