Author: rsearls
Date: 2015-01-02 09:24:30 -0500 (Fri, 02 Jan 2015)
New Revision: 19307
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
Log:
arquillian migration jbws1283 test
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java 2015-01-02
14:21:47 UTC (rev 19306)
+++
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java 2015-01-02
14:24:30 UTC (rev 19307)
@@ -36,7 +36,15 @@
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-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.ws.api.handler.GenericSOAPHandler;
import org.jboss.wsf.test.JBossWSTest;
@@ -47,14 +55,18 @@
/**
* [JBWS-1283] Attachment dropped on outbound messages if they have been added through a
handler
*/
+(a)RunWith(Arquillian.class)
public class JBWS1283TestCase extends JBossWSTest
{
private final String targetNS = "http://org.jboss.test.ws/jbws1283";
private JBWS1283Endpoint port;
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-jbws1283.jar") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static JavaArchive createDeployments() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class,
"jaxws-jbws1283.jar");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.jbws1283.AttachmentHandler.class)
@@ -63,30 +75,26 @@
.addClass(org.jboss.test.ws.jaxws.jbws1283.JBWS1283TestCase.VerifyAttachmentHandler.class)
.addClass(org.jboss.test.ws.jaxws.jbws1283.JBWS1283TestCase.class)
.addAsResource("org/jboss/test/ws/jaxws/jbws1283/jaxws-handlers-server.xml");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS1283TestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
@Override
protected void setUp() throws Exception
{
super.setUp();
QName serviceName = new QName(targetNS, "JBWS1283Service");
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1283/JBWS1283Service/JBWS1283EndpointImpl?wsdl");
+ URL wsdlURL = new URL(baseURL +
"/jaxws-jbws1283/JBWS1283Service/JBWS1283EndpointImpl?wsdl");
Service service = Service.create(wsdlURL, serviceName);
port = service.getPort(JBWS1283Endpoint.class);
}
+ @Test
+ @RunAsClient
public void testAttachmentResponse() throws Exception
{
+ setUp();
// Add a client-side handler that verifes existence of the attachment
BindingProvider bindingProvider = (BindingProvider)port;
@SuppressWarnings("rawtypes")