Author: rsearls
Date: 2015-01-02 09:19:22 -0500 (Fri, 02 Jan 2015)
New Revision: 19305
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.java
Log:
arquillian migration doclit test
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.java 2015-01-01
21:56:28 UTC (rev 19304)
+++
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.java 2015-01-02
14:19:22 UTC (rev 19305)
@@ -22,6 +22,7 @@
package org.jboss.test.ws.jaxws.samples.xop.doclit;
import java.io.InputStream;
+import java.lang.System;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -33,7 +34,14 @@
import javax.xml.ws.handler.Handler;
import javax.xml.ws.soap.SOAPBinding;
-import junit.framework.Test;
+import org.jboss.wsf.test.JBossWSTestHelper;
+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.spec.WebArchive;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -50,22 +58,22 @@
* @author Heiko Braun <heiko.braun(a)jboss.com>
* @since 05.12.2006
*/
+(a)RunWith(Arquillian.class)
public class XOPHandlerTestCase extends XOPBase
{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-samples-xop-doclit/bare";
+ @ArquillianResource
+ private URL baseURL;
- public static Test suite()
- {
- return new JBossWSTestSetup(XOPHandlerTestCase.class, DeploymentArchive.NAME);
+ @Deployment(testable = false)
+ public static WebArchive createDeployment() {
+ return DeploymentArchive.createDeployment();
}
@Override
protected void setUp() throws Exception
{
-
QName serviceName = new
QName("http://doclit.xop.samples.jaxws.ws.test.jboss.org/",
"MTOMService");
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
-
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-samples-xop-doclit/bare" + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
port = service.getPort(MTOMEndpoint.class);
binding = (SOAPBinding)((BindingProvider)port).getBinding();
@@ -81,11 +89,12 @@
* Consumption of inlined data should will always result on
'application/octet-stream'
* @throws Exception
*/
- @Override
+ @Test
+ @RunAsClient
public void testDataHandlerRoundtrip() throws Exception
{
+ setUp();
getBinding().setMTOMEnabled(true);
-
DataHandler dh = new DataHandler("Client Data", "text/plain");
DHResponse response = getPort().echoDataHandler(new DHRequest(dh));
assertNotNull(response);
@@ -97,9 +106,11 @@
* Consumption of inlined data should will always result on
'application/octet-stream'
* @throws Exception
*/
- @Override
+ @Test
+ @RunAsClient
public void testDataHandlerResponseOptimzed() throws Exception
{
+ setUp();
getBinding().setMTOMEnabled(false);
DataHandler dh = new DataHandler("Client data", "text/plain");