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

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Dec 22 14:41:37 EST 2014


Author: rsearls
Date: 2014-12-22 14:41:37 -0500 (Mon, 22 Dec 2014)
New Revision: 19187

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

Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java	2014-12-22 19:28:58 UTC (rev 19186)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java	2014-12-22 19:41:37 UTC (rev 19187)
@@ -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.JavaArchive;
 
 import org.jboss.wsf.test.JBossWSTest;
 import org.jboss.wsf.test.JBossWSTestHelper;
@@ -41,11 +49,15 @@
  *
  * @author richard.opalka at jboss.com
  */
+ at RunWith(Arquillian.class)
 public class JBWS1872TestCase extends JBossWSTest
 {
-   public static BaseDeployment<?>[] createDeployments() {
-      List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
-      list.add(new JarDeployment("jaxws-jbws1872.jar") { {
+   @ArquillianResource
+   private URL baseURL;
+
+   @Deployment(testable = false)
+   public static JavaArchive createDeployments() {
+      JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "jaxws-jbws1872.jar");
          archive
                .addManifest()
                .addClass(org.jboss.test.ws.jaxws.jbws1872.EJB3Bean1.class)
@@ -53,19 +65,14 @@
                .addClass(org.jboss.test.ws.jaxws.jbws1872.EJB3Bean3.class)
                .addClass(org.jboss.test.ws.jaxws.jbws1872.LocalIface.class)
                .addClass(org.jboss.test.ws.jaxws.jbws1872.RemoteIface.class);
-         }
-      });
-      return list.toArray(new BaseDeployment<?>[list.size()]);
+      return archive;
    }
 
-   public static Test suite()
-   {
-      return new JBossWSTestSetup(JBWS1872TestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
-   }
-
+  @Test
+  @RunAsClient
    public void testEJB1() throws Exception
    {
-      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1872/Bean1?wsdl");
+      URL wsdlURL = new URL(baseURL + "/jaxws-jbws1872/Bean1?wsdl");
       QName serviceName = new QName("http://org.jboss.ws/jbws1872", "EJB3Bean1Service");
       Service service = Service.create(wsdlURL, serviceName);
       Client1 port = service.getPort(Client1.class);
@@ -73,9 +80,11 @@
       assertEquals("bean1-hello", retStr);
    }
 
+   @Test
+   @RunAsClient
    public void testEJB2() throws Exception
    {
-      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1872/Bean2?wsdl");
+     URL wsdlURL = new URL(baseURL + "/jaxws-jbws1872/Bean2?wsdl");
       QName serviceName = new QName("http://org.jboss.ws/jbws1872", "EJB3Bean2Service");
       Service service = Service.create(wsdlURL, serviceName);
       Client2 port = service.getPort(Client2.class);
@@ -83,9 +92,11 @@
       assertEquals("bean2-hello", retStr);
    }
 
+   @Test
+   @RunAsClient
    public void testEJB3() throws Exception
    {
-      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1872/Bean3?wsdl");
+      URL wsdlURL = new URL(baseURL + "/jaxws-jbws1872/Bean3?wsdl");
       QName serviceName = new QName("http://org.jboss.ws/jbws1872", "EJB3Bean3Service");
       Service service = Service.create(wsdlURL, serviceName);
       Client3 port = service.getPort(Client3.class);



More information about the jbossws-commits mailing list