[jbossws-commits] JBossWS SVN: r19198 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3441.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Dec 22 16:46:14 EST 2014


Author: rsearls
Date: 2014-12-22 16:46:14 -0500 (Mon, 22 Dec 2014)
New Revision: 19198

Modified:
   stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3441/JBWS3441TestCase.java
Log:
arquillian migration jbws3441 test

Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3441/JBWS3441TestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3441/JBWS3441TestCase.java	2014-12-22 21:34:53 UTC (rev 19197)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3441/JBWS3441TestCase.java	2014-12-22 21:46:14 UTC (rev 19198)
@@ -29,7 +29,15 @@
 import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
 
-import junit.framework.Test;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
 
 import org.jboss.wsf.test.JBossWSTest;
 import org.jboss.wsf.test.JBossWSTestHelper;
@@ -41,11 +49,15 @@
  *
  * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
  */
+ at RunWith(Arquillian.class)
 public class JBWS3441TestCase extends JBossWSTest
 {
-   public static BaseDeployment<?>[] createDeployments() {
-      List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
-      list.add(new JBossWSTestHelper.WarDeployment("jaxws-jbws3441.war") { {
+   @ArquillianResource
+   private URL baseURL;
+
+   @Deployment(testable = false)
+   public static WebArchive createDeployments() {
+      WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-jbws3441.war");
          archive
                .addManifest()
                .addClass(org.jboss.test.ws.jaxws.jbws3441.EJB3EndpointImpl.class)
@@ -57,19 +69,12 @@
                .addClass(org.jboss.test.ws.jaxws.jbws3441.POJOInterceptorImpl.class)
                .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/jbws3441/META-INF/permissions.xml"), "permissions.xml")
                .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/jbws3441/WEB-INF/beans.xml"), "beans.xml");
-         }
-      });
-      return list.toArray(new BaseDeployment<?>[list.size()]);
+      return archive;
    }
-   
-   public static Test suite() throws Exception
-   {
-      return new JBossWSTestSetup(JBWS3441TestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
-   }
 
    private EndpointIface getPojo() throws Exception
    {
-      final URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws3441/POJOEndpointService?wsdl");
+      final URL wsdlURL = new URL(baseURL + "/POJOEndpointService?wsdl");
       final QName serviceName = new QName("http://org.jboss.test.ws/jbws3441", "POJOEndpointService");
       final Service service = Service.create(wsdlURL, serviceName);
       return service.getPort(EndpointIface.class);
@@ -77,12 +82,14 @@
 
    private EndpointIface getEjb3() throws Exception
    {
-      final URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws3441/EJB3EndpointService/EJB3Endpoint?wsdl");
+      final URL wsdlURL = new URL(baseURL + "/EJB3EndpointService/EJB3Endpoint?wsdl");
       final QName serviceName = new QName("http://org.jboss.test.ws/jbws3441", "EJB3EndpointService");
       final Service service = Service.create(wsdlURL, serviceName);
       return service.getPort(EndpointIface.class);
    }
 
+   @Test
+   @RunAsClient
    public void testPojoCall() throws Exception
    {
       String message = "Hi";
@@ -90,6 +97,8 @@
       assertEquals("Hi (including POJO interceptor)", response);
    }
 
+   @Test
+   @RunAsClient
    public void testEjb3Call() throws Exception
    {
       String message = "Hi";



More information about the jbossws-commits mailing list