1 22 package org.jboss.test.webservice.jbws70; 23 24 import javax.naming.InitialContext ; 25 import javax.xml.rpc.Service ; 26 27 import junit.framework.Test; 28 import junit.framework.TestSuite; 29 30 import org.jboss.test.JBossTestCase; 31 import org.jboss.test.webservice.WebserviceTestBase; 32 33 41 public class JBWS70TestCase extends WebserviceTestBase 42 { 43 private static Hello hello; 44 45 47 public JBWS70TestCase(String name) 48 { 49 super(name); 50 } 51 52 53 public static Test suite() throws Exception 54 { 55 TestSuite suite = new TestSuite(); 58 suite.addTest(new JBWS70TestCase("testSetVersion")); 59 suite.addTest(new JBWS70TestCase("testGetVersion")); 60 61 return JBossTestCase.getDeploySetup(suite, "ws4ee-jbws70.war, ws4ee-jbws70-client.jar"); 62 } 63 64 public void setUp() throws Exception 65 { 66 super.setUp(); 67 if (hello == null) 68 { 69 InitialContext iniCtx = getClientContext(); 70 Service service = (Service )iniCtx.lookup("java:comp/env/service/HelloService"); 71 hello = (Hello)service.getPort(Hello.class); 72 } 73 } 74 75 public void testSetVersion() throws Exception 76 { 77 hello.setVersion("Version-1.0"); 78 } 79 80 public void testGetVersion() throws Exception 81 { 82 assertEquals("Version-1.0", hello.getVersion()); 83 } 84 } 85 | Popular Tags |