Author: rsearls
Date: 2014-12-28 16:35:51 -0500 (Sun, 28 Dec 2014)
New Revision: 19292
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCaseForked.java
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCaseForked.java
Log:
arquillian migration tools test
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCaseForked.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCaseForked.java 2014-12-28
20:00:32 UTC (rev 19291)
+++
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCaseForked.java 2014-12-28
21:35:51 UTC (rev 19292)
@@ -21,12 +21,24 @@
*/
package org.jboss.test.ws.jaxws.smoke.tools;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.jboss.arquillian.container.test.api.Deployer;
+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;
+
/**
* Test the WSContractConsumer API across different implementations.
*
* @author Heiko.Braun(a)jboss.com
* @author alessio.soldano(a)jboss.com
*/
+(a)RunWith(Arquillian.class)
public class WSConsumerTestCaseForked extends PluginBase
{
@@ -54,28 +66,39 @@
* Specifies the JAX-WS and JAXB binding files to use on import operations.
* See
http://java.sun.com/webservices/docs/2.0/jaxws/customizations.html
*/
+ @Test
+ @RunAsClient
public void testBindingFiles() throws Exception
{
+ setUp();
dispatch("testBindingFiles");
-
+ tearDown();
}
/**
* Sets the OASIS XML Catalog file to use for entity resolution.
*
*/
+ @Test
+ @RunAsClient
public void testCatalog() throws Exception
{
+ setUp();
dispatch("testCatalog");
+ tearDown();
}
/**
* Sets the main output directory. If the directory does not exist, it will be
created. org.jboss.test.ws.jaxws.smoke.tools
*
*/
+ @Test
+ @RunAsClient
public void testOutputDirectory() throws Exception
{
+ setUp();
dispatch("testOutputDirectory");
+ tearDown();
}
/**
@@ -84,9 +107,13 @@
* the output directory will be used instead.
*
*/
+ @Test
+ @RunAsClient
public void testSourceDirectory() throws Exception
{
+ setUp();
dispatch("testSourceDirectory");
+ tearDown();
}
@@ -94,26 +121,38 @@
* If there are "-n" and "-s" flag, with "-k", the
generated
* artifacts should be placed in source directory
*/
+ @Test
+ @RunAsClient
public void testNoCompile() throws Exception
{
+ setUp();
dispatch("testNoCompile");
+ tearDown();
}
/**
* If there are "-n" and "-s" flag, without "-k",
nothing should be generated
*/
+ @Test
+ @RunAsClient
public void testNoCompileNoKeep() throws Exception
{
+ setUp();
dispatch("testNoCompileNoKeep");
+ tearDown();
}
/**
* Enables/Disables Java source generation.
*
*/
+ @Test
+ @RunAsClient
public void testGenerateSource() throws Exception
{
+ setUp();
dispatch("testGenerateSource");
+ tearDown();
}
/**
@@ -121,27 +160,39 @@
* is based off of the XML namespace.
*
*/
+ @Test
+ @RunAsClient
public void testTargetPackage() throws Exception
{
+ setUp();
dispatch("testTargetPackage");
+ tearDown();
}
/**
* Sets the @(a)WebService.wsdlLocation and @(a)WebServiceClient.wsdlLocation attributes
to a custom value.
*
*/
+ @Test
+ @RunAsClient
public void testWsdlLocation() throws Exception
{
+ setUp();
dispatch("testWsdlLocation");
+ tearDown();
}
/**
* Sets the PrintStream to use for status feedback.
* The simplest example would be to use System.out.
*/
+ @Test
+ @RunAsClient
public void testMessageStream() throws Exception
{
+ setUp();
dispatch("testMessageStream");
+ tearDown();
}
/**
@@ -162,27 +213,38 @@
/**
* Set the target JAX-WS specification target. Defaults to
<code>2.0</code>
*/
+ @Test
+ @RunAsClient
public void testTarget() throws Exception
{
+ setUp();
dispatch("testTarget");
-
+ tearDown();
}
/**
* Tests the SOAP 1.2 binding extension
*
*/
+ @Test
+ @RunAsClient
public void testSOAP12Extension() throws Exception
{
+ setUp();
dispatch("testSOAP12Extension");
+ tearDown();
}
/**
* Test the implicit header generation support
*/
+ @Test
+ @RunAsClient
public void testAdditionalHeaders() throws Exception
{
+ setUp();
dispatch("testAdditionalHeaders");
+ tearDown();
}
protected boolean filtered(String jarName)
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCaseForked.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCaseForked.java 2014-12-28
20:00:32 UTC (rev 19291)
+++
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCaseForked.java 2014-12-28
21:35:51 UTC (rev 19292)
@@ -27,44 +27,54 @@
import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.jboss.arquillian.container.test.api.Deployer;
+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;
+
/**
* @author Heiko.Braun(a)jboss.com
*/
+(a)RunWith(Arquillian.class)
public class WSProviderTestCaseForked extends PluginBase
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.JarDeployment("jaxws-classloading-types.jar") { {
+ @Deployment(name="jaxws-classloading-types", order=1, testable = false)
+ public static JavaArchive createDeployment1() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class,
"jaxws-classloading-types.jar");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.smoke.tools.service.Echo.class)
.addClass(org.jboss.test.ws.jaxws.smoke.tools.service.EchoResponse.class)
.addClass(org.jboss.test.ws.jaxws.smoke.tools.service.Message.class);
- }
- });
- list.add(new
JBossWSTestHelper.JarDeployment("jaxws-classloading-service.jar") { {
+ return archive;
+ }
+
+ @Deployment(name="jaxws-classloading-service", order=2, testable = false)
+ public static JavaArchive createDeployment2() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class,
"jaxws-classloading-service.jar");
archive
- .addManifest()
- .addClass(org.jboss.test.ws.jaxws.smoke.tools.service.HelloWorld.class);
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.smoke.tools.service.HelloWorld.class);
+ return archive;
}
-
+
/**
* Recreates a tools delegate for every test
* @throws Exception
*/
protected void setUp() throws Exception
{
-
setupClasspath();
Class<?> wspClass = Thread.currentThread().getContextClassLoader()
.loadClass("org.jboss.test.ws.jaxws.smoke.tools.WSProviderPlugin");
setDelegate(wspClass);
-
- JBossWSTestHelper.writeToFile(createDeployments());
}
@@ -73,44 +83,76 @@
restoreClasspath();
}
+ @Test
+ @RunAsClient
public void testGenerateWsdl() throws Exception
{
+ setUp();
dispatch("testGenerateWsdl");
+ tearDown();
}
-
+
+ @Test
+ @RunAsClient
public void testGenerateWsdlWithExtension() throws Exception
{
+ setUp();
dispatch("testGenerateWsdlWithExtension");
+ tearDown();
}
+ @Test
+ @RunAsClient
public void testGenerateSource() throws Exception
{
+ setUp();
dispatch("testGenerateSource");
+ tearDown();
}
+ @Test
+ @RunAsClient
public void testOutputDirectory() throws Exception
{
+ setUp();
dispatch("testOutputDirectory");
+ tearDown();
}
+ @Test
+ @RunAsClient
public void testResourceDirectory() throws Exception
{
+ setUp();
dispatch("testResourceDirectory");
+ tearDown();
}
+ @Test
+ @RunAsClient
public void testSourceDirectory() throws Exception
{
+ setUp();
dispatch("testSourceDirectory");
+ tearDown();
}
+ @Test
+ @RunAsClient
public void testClassLoader() throws Exception
{
+ setUp();
dispatch("testClassLoader");
+ tearDown();
}
+ @Test
+ @RunAsClient
public void testMessageStream() throws Exception
{
+ setUp();
dispatch("testMessageStream");
+ tearDown();
}
/**