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

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Dec 24 16:06:03 EST 2014


Author: rsearls
Date: 2014-12-24 16:06:03 -0500 (Wed, 24 Dec 2014)
New Revision: 19257

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

Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3556/JBWS3556TestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3556/JBWS3556TestCase.java	2014-12-24 20:55:00 UTC (rev 19256)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3556/JBWS3556TestCase.java	2014-12-24 21:06:03 UTC (rev 19257)
@@ -28,7 +28,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;
@@ -38,32 +46,32 @@
 /**
  * @author <a href="ropalka at redhat.com">Richard Opalka</a>
  */
+ at RunWith(Arquillian.class)
 public class JBWS3556TestCase extends JBossWSTest {
 
-   public static BaseDeployment<?>[] createDeployments() {
-      List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
-      list.add(new JBossWSTestHelper.WarDeployment("jaxws-jbws3556.war") { {
+   @ArquillianResource
+   private URL baseURL;
+
+   @Deployment(testable = false)
+   public static WebArchive createDeployments() {
+      WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-jbws3556.war");
          archive
                .addManifest()
                .addClass(org.jboss.test.ws.jaxws.jbws3556.EndpointIface.class)
                .addClass(org.jboss.test.ws.jaxws.jbws3556.EndpointImpl.class)
                .addClass(org.jboss.test.ws.jaxws.jbws3556.MyException.class);
-         }
-      });
-      return list.toArray(new BaseDeployment<?>[list.size()]);
+      return archive;
    }
 
-    public static Test suite() {
-        return new JBossWSTestSetup(JBWS3556TestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
-    }
-
     private EndpointIface getProxy() throws Exception {
-        final URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws3556/EndpointImpl?wsdl");
+        final URL wsdlURL = new URL(baseURL + "/EndpointImpl?wsdl");
         final QName serviceName = new QName("http://jbws3556.jaxws.ws.test.jboss.org/", "EndpointImplService");
         final Service service = Service.create(wsdlURL, serviceName);
         return service.getPort(EndpointIface.class);
     }
 
+   @Test
+   @RunAsClient
     public void testException() throws Exception {
         EndpointIface endpoint = getProxy();
         try {



More information about the jbossws-commits mailing list