[jbossws-commits] JBossWS SVN: r19168 - in stack/cxf/branches/arquillian/modules/testsuite/shared-tests: src/test/java/org/jboss/test/ws/publish and 1 other directory.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Sun Dec 21 11:33:45 EST 2014
Author: rsearls
Date: 2014-12-21 11:33:45 -0500 (Sun, 21 Dec 2014)
New Revision: 19168
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/pom.xml
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/publish/EndpointPublishTestCase.java
Log:
arquillian conversion publish test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/pom.xml 2014-12-20 20:28:51 UTC (rev 19167)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/pom.xml 2014-12-21 16:33:45 UTC (rev 19168)
@@ -108,7 +108,7 @@
</execution>
</executions>
</plugin>
- <!-- rls
+
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
@@ -151,7 +151,7 @@
</execution>
</executions>
</plugin>
- rls -->
+
<plugin> <!-- This copies jbossws-cxf-factories jar to endorsed dir before the integration-tests are run -->
<artifactId>maven-resources-plugin</artifactId>
<executions>
@@ -178,7 +178,7 @@
</plugins>
</build>
</profile>
- <!-- rls
+
<profile>
<id>build-benchmarks</id>
<build>
@@ -210,7 +210,7 @@
</plugins>
</build>
</profile>
- rls -->
+
<!-- When the 'fast' profile is on, the testsuite runs in parallel mode; Arquillan messes up with containers in such a scenario, unless they're started upfront.
So we start all the containers specified in the arquillan.xml configuration -->
<profile>
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/publish/EndpointPublishTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/publish/EndpointPublishTestCase.java 2014-12-20 20:28:51 UTC (rev 19167)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/publish/EndpointPublishTestCase.java 2014-12-21 16:33:45 UTC (rev 19168)
@@ -26,14 +26,21 @@
import java.util.LinkedList;
import java.util.List;
-import junit.framework.Test;
-
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
import org.jboss.wsf.test.JBossWSTestSetup;
+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.junit.Test;
+import org.junit.runner.RunWith;
/**
* Test WS endpoint publish api to JBoss AS container
@@ -41,40 +48,39 @@
* @author alessio.soldano at jboss.com
* @since 13-Jul-2011
*/
+ at RunWith(Arquillian.class)
public class EndpointPublishTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("endpoint-publish.war") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,"endpoint-publish.war");
archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.common\n"))
- .addAsResource("org/jboss/test/ws/publish/WEB-INF/wsdl/EndpointImpl3.xml", "WEB-INF/wsdl/EndpointImpl3.xml")
- .addAsResource("org/jboss/test/ws/publish/WEB-INF/wsdl/EndpointImpl4.xml", "WEB-INF/wsdl/EndpointImpl4.xml")
- .addClass(org.jboss.test.ws.publish.Endpoint.class)
- .addClass(org.jboss.test.ws.publish.EndpointImpl.class)
- .addClass(org.jboss.test.ws.publish.EndpointImpl2.class)
- .addClass(org.jboss.test.ws.publish.EndpointImpl3.class)
- .addClass(org.jboss.test.ws.publish.EndpointImpl4.class)
- .addClass(org.jboss.test.ws.publish.EndpointImpl5.class)
- .addAsResource("org/jboss/test/ws/publish/EndpointImpl5.xml")
- .addClass(org.jboss.test.ws.publish.EndpointPublishServlet.class)
- .addAsResource("org/jboss/test/ws/publish/TestService.xml")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/publish/META-INF/permissions.xml"), "permissions.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/publish/WEB-INF/wsdl/EndpointImpl3.xml"), "wsdl/EndpointImpl3.xml");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.jboss.ws.common\n"))
+ .addAsResource("org/jboss/test/ws/publish/WEB-INF/wsdl/EndpointImpl3.xml", "WEB-INF/wsdl/EndpointImpl3.xml")
+ .addAsResource("org/jboss/test/ws/publish/WEB-INF/wsdl/EndpointImpl4.xml", "WEB-INF/wsdl/EndpointImpl4.xml")
+ .addClass(org.jboss.test.ws.publish.Endpoint.class)
+ .addClass(org.jboss.test.ws.publish.EndpointImpl.class)
+ .addClass(org.jboss.test.ws.publish.EndpointImpl2.class)
+ .addClass(org.jboss.test.ws.publish.EndpointImpl3.class)
+ .addClass(org.jboss.test.ws.publish.EndpointImpl4.class)
+ .addClass(org.jboss.test.ws.publish.EndpointImpl5.class)
+ .addAsResource("org/jboss/test/ws/publish/EndpointImpl5.xml")
+ .addClass(org.jboss.test.ws.publish.EndpointPublishServlet.class)
+ .addAsResource("org/jboss/test/ws/publish/TestService.xml")
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/publish/META-INF/permissions.xml"), "permissions.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/publish/WEB-INF/wsdl/EndpointImpl3.xml"), "wsdl/EndpointImpl3.xml");
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(EndpointPublishTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testEndpointPublish() throws Exception
{
- URL url = new URL("http://" + getServerHost() + ":8080/endpoint-publish");
+ URL url = new URL(baseURL + "/endpoint-publish");
assertEquals("1", IOUtils.readAndCloseStream(url.openStream()));
}
}
More information about the jbossws-commits
mailing list