[jbossws-commits] JBossWS SVN: r19228 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/oneway.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Tue Dec 23 11:27:38 EST 2014
Author: rsearls
Date: 2014-12-23 11:27:37 -0500 (Tue, 23 Dec 2014)
New Revision: 19228
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/oneway/OneWayTestCase.java
Log:
arquillian migration oneway test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/oneway/OneWayTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/oneway/OneWayTestCase.java 2014-12-23 16:19:29 UTC (rev 19227)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/oneway/OneWayTestCase.java 2014-12-23 16:27:37 UTC (rev 19228)
@@ -34,7 +34,15 @@
import javax.xml.ws.Service;
import javax.xml.ws.Service.Mode;
-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.DOMUtils;
import org.jboss.ws.common.DOMWriter;
@@ -50,30 +58,29 @@
* @author Thomas.Diesler at jboss.org
* @since 07-Oct-2005
*/
+ at RunWith(Arquillian.class)
public class OneWayTestCase extends JBossWSTest
{
private static final String targetNS = "http://oneway.samples.jaxws.ws.test.jboss.org/";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-oneway.war") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-samples-oneway.war");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.samples.oneway.PingEndpointImpl.class)
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/oneway/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(OneWayTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testWebService() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-oneway/TestService?wsdl");
+ URL wsdlURL = new URL(baseURL + "/TestService?wsdl");
QName serviceName = new QName(targetNS, "PingEndpointService");
QName portName = new QName(targetNS, "PingEndpointPort");
Service service = Service.create(wsdlURL, serviceName);
More information about the jbossws-commits
mailing list