1 package org.jboss.test.bpel.ws.production; 2 3 import java.util.Properties ; 4 import javax.naming.InitialContext ; 5 6 import junit.framework.Test; 7 8 import org.jboss.test.webservice.WebserviceTestBase; 9 10 14 public class ProviderTestCase extends WebserviceTestBase { 15 16 private HelloPT greeter; 17 18 public ProviderTestCase(String name) { 19 super(name); 20 } 21 22 protected void setUp() throws Exception { 23 InitialContext ctx = getClientContext(); 24 String serviceRefName = "service/Hello"; 26 HelloWorldService service = (HelloWorldService) ctx.lookup("java:comp/env/" + serviceRefName); 28 greeter = service.getCallerPort(); 30 } 31 32 public void testSayHello() throws Exception { 33 String greeting = greeter.sayHello("Popeye"); 34 assertEquals("Hello, Popeye!", greeting); 35 } 36 37 public static Test suite() throws Exception { 38 return getDeploySetup(ProviderTestCase.class, "bpel-hello.ear"); 39 } 40 } | Popular Tags |