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

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Dec 22 16:53:38 EST 2014


Author: rsearls
Date: 2014-12-22 16:53:38 -0500 (Mon, 22 Dec 2014)
New Revision: 19199

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

Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3250/JBWS3250TestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3250/JBWS3250TestCase.java	2014-12-22 21:46:14 UTC (rev 19198)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3250/JBWS3250TestCase.java	2014-12-22 21:53:38 UTC (rev 19199)
@@ -34,7 +34,15 @@
 import javax.xml.ws.soap.SOAPBinding;
 
 import junit.framework.Assert;
-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.ws.common.IOUtils;
 import org.jboss.wsf.test.JBossWSTest;
@@ -42,11 +50,15 @@
 import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
 import org.jboss.wsf.test.JBossWSTestSetup;
 
+ at RunWith(Arquillian.class)
 public class JBWS3250TestCase extends JBossWSTest
 {
-   public static BaseDeployment<?>[] createDeployments() {
-      List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
-      list.add(new JBossWSTestHelper.WarDeployment("jaxws-jbws3250.war") { {
+   @ArquillianResource
+   private URL baseURL;
+
+   @Deployment(testable = false)
+   public static WebArchive createDeployments() {
+      WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-jbws3250.war");
          archive
                .addManifest()
                .addClass(org.jboss.test.ws.jaxws.jbws3250.Endpoint.class)
@@ -54,21 +66,14 @@
                .addClass(org.jboss.test.ws.jaxws.jbws3250.MTOMRequest.class)
                .addClass(org.jboss.test.ws.jaxws.jbws3250.MTOMResponse.class)
                .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/jbws3250/WEB-INF/web.xml"));
-         }
-      });
-      return list.toArray(new BaseDeployment<?>[list.size()]);
+      return archive;
    }
 
-   private String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws3250";
-
-   public static Test suite() throws Exception
-   {
-      return new JBossWSTestSetup(JBWS3250TestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
-   }
-
+   @Test
+   @RunAsClient
    public void testMtomSawpFile() throws Exception
    {
-      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      URL wsdlURL = new URL(baseURL + "?wsdl");
       QName serviceName = new QName("http://ws.jboss.org/jbws3250", "TestEndpointService");
       Endpoint port = Service.create(wsdlURL, serviceName).getPort(Endpoint.class);
       SOAPBinding binding =(SOAPBinding)((BindingProvider)port).getBinding();



More information about the jbossws-commits mailing list