Author: rsearls
Date: 2014-12-24 14:27:29 -0500 (Wed, 24 Dec 2014)
New Revision: 19246
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/namespace/MultipleNamespacesTestCase.java
Log:
arquillian migration namespace test
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/namespace/MultipleNamespacesTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/namespace/MultipleNamespacesTestCase.java 2014-12-24
19:21:16 UTC (rev 19245)
+++
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/namespace/MultipleNamespacesTestCase.java 2014-12-24
19:27:29 UTC (rev 19246)
@@ -29,7 +29,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.WebArchive;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
@@ -42,11 +50,15 @@
* @author Heiko.Braun(a)jboss.org
* @since 23.01.2007
*/
+(a)RunWith(Arquillian.class)
public class MultipleNamespacesTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-namespace.war") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-namespace.war");
archive
.addManifest()
.addClass(org.jboss.test.helper.DOMWriter.class)
@@ -56,15 +68,8 @@
.addAsResource("org/jboss/test/ws/jaxws/namespace/handler-chain.xml")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/namespace/WEB-INF/jboss-web.xml"), "jboss-web.xml")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/namespace/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
-
- public static Test suite()
- {
- return new JBossWSTestSetup(MultipleNamespacesTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
/**
* If the @WebService.targetNamespace annotation is on a service implementation bean
that does NOT reference a service
@@ -75,10 +80,12 @@
* interface (through the endpointInterface annotation element), the targetNamespace
is used for only the wsdl:service (and
* associated XML elements).
*/
+ @Test
+ @RunAsClient
public void testSEIDerivedNamespaces() throws Exception
{
// Create the port
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-namespace?wsdl");
+ URL wsdlURL = new URL(baseURL + "?wsdl");
QName qname = new
QName("http://example.org/impl",
"EndpointBeanService");
Service service = Service.create(wsdlURL, qname);
EndpointInterface port = service.getPort(EndpointInterface.class);