JBossWS SVN: r19233 - in stack/cxf/branches/arquillian: modules/dist and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-12-23 17:14:09 -0500 (Tue, 23 Dec 2014)
New Revision: 19233
Modified:
stack/cxf/branches/arquillian/README
stack/cxf/branches/arquillian/modules/dist/pom.xml
stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/pom.xml
stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml
stack/cxf/branches/arquillian/modules/testsuite/pom.xml
Log:
A bunch of build improvements and related instructions in README
Modified: stack/cxf/branches/arquillian/README
===================================================================
--- stack/cxf/branches/arquillian/README 2014-12-23 17:42:45 UTC (rev 19232)
+++ stack/cxf/branches/arquillian/README 2014-12-23 22:14:09 UTC (rev 19233)
@@ -7,8 +7,13 @@
> mvn -PwildflyXYZ integration-test
-The -Dserver.home=/foo/bar option can be used to run the testsuite against a given local server instance; the server does not need to be already running, as the build will create various standalone server configurations and start multiple instances.
-The -Dexclude-udp-tests=true option can be used to skip UDP tests; that might be needed when running on a network that does not allow UDP broadcast.
+The '-Dserver.home=/foo/bar' option can be used to run the testsuite against a given local server instance; the server must not be already running, as the build will create various standalone server configurations and start multiple instances.
+The '-Dexclude-udp-tests' option can be used to skip UDP tests; that might be needed when running on a network that does not allow UDP broadcast.
+The '-Dnodeploy' option can be used to avoid upgrading the ws stack on the target server container.
+The '-Dnoprepare' option can be used to avoid integration tests preparation phase, which includes tuning of the server configurations, wsconsume/wsprovide invocations, etc.
+The '-Ddebug' option can be used to turn on surefire debugging of integration tests only.
+The '-Djboss.bind.address=x.y.w.z' option can be used to have the started containers bound to the specified network interface address.
+The '-Darquillian.deploymentExportPath=target/foo' option can be used to have Arquillian write the actual test deployments to disk.
The 'fast' profile can also be used to run tests concurrently.
Modified: stack/cxf/branches/arquillian/modules/dist/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/dist/pom.xml 2014-12-23 17:42:45 UTC (rev 19232)
+++ stack/cxf/branches/arquillian/modules/dist/pom.xml 2014-12-23 22:14:09 UTC (rev 19233)
@@ -107,48 +107,6 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>distribution-package</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <finalName>assembly</finalName>
- <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>src/main/scripts/assembly-deploy-artifacts.xml</descriptor>
- </descriptors>
- <tarLongFileMode>gnu</tarLongFileMode>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>validate-jboss-home</id>
- <phase>validate</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <echo />
- <echo message="profile=${jbossws.integration.target}" />
- <echo message="jboss.home=${jboss.home}" />
- <echo />
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<inherited>false</inherited>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
@@ -343,15 +301,38 @@
<id>deploy</id>
<activation>
<property>
- <name>!no-deploy</name>
+ <name>!nodeploy</name>
</property>
</activation>
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>distribution-package</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>assembly</finalName>
+ <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/main/scripts/assembly-deploy-artifacts.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
+ <id>bdeploy</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
@@ -371,5 +352,44 @@
</build>
</profile>
+ <!--
+ Name: echo
+ Descr: A profile for printing few env property values; this is moved to the end of the pom here
+ to avoid it affecting the plugin execution order due to a bug in Maven with multiple
+ plugins of the same type in different phases.
+ -->
+ <profile>
+ <id>echo</id>
+ <activation>
+ <property>
+ <name>!echo</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>validate-jboss-home</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <echo />
+ <echo message="profile=${jbossws.integration.target}" />
+ <echo message="jboss.home=${jboss.home}" />
+ <echo />
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
</profiles>
</project>
Modified: stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/pom.xml 2014-12-23 17:42:45 UTC (rev 19232)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/pom.xml 2014-12-23 22:14:09 UTC (rev 19233)
@@ -277,6 +277,8 @@
<jvmArgs>-server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m ${additionalJvmArgs}</jvmArgs>
<serverConfig>jbws-testsuite-default.xml</serverConfig>
<jbossHome>${jboss.home}</jbossHome>
+ <!-- TODO: add serverArgs section to use a custom bind address (requires wildfly-maven-plugin 1.1.0 +)
+ https://github.com/wildfly/wildfly-maven-plugin/commit/160b1a29f4e26fff9f... -->
<port>9990</port>
</configuration>
</execution>
@@ -290,6 +292,8 @@
<jvmArgs>-server -XX:+UseCompressedOops -Xms48m -Xmx384m -XX:MaxPermSize=192m -Djboss.socket.binding.port-offset=10000 ${additionalJvmArgs}</jvmArgs>
<serverConfig>jbws-testsuite-ssl-mutual-auth.xml</serverConfig>
<jbossHome>${jboss.home}</jbossHome>
+ <!-- TODO: add serverArgs section to use a custom bind address (requires wildfly-maven-plugin 1.1.0 +)
+ https://github.com/wildfly/wildfly-maven-plugin/commit/160b1a29f4e26fff9f... -->
<port>19990</port>
</configuration>
</execution>
@@ -303,6 +307,8 @@
<jvmArgs>-server -XX:+UseCompressedOops -Xms48m -Xmx384m -XX:MaxPermSize=192m -Djboss.socket.binding.port-offset=20000 ${additionalJvmArgs}</jvmArgs>
<serverConfig>jbws-testsuite-default-config-tests.xml</serverConfig>
<jbossHome>${jboss.home}</jbossHome>
+ <!-- TODO: add serverArgs section to use a custom bind address (requires wildfly-maven-plugin 1.1.0 +)
+ https://github.com/wildfly/wildfly-maven-plugin/commit/160b1a29f4e26fff9f... -->
<port>29990</port>
</configuration>
</execution>
Modified: stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml 2014-12-23 17:42:45 UTC (rev 19232)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml 2014-12-23 22:14:09 UTC (rev 19233)
@@ -9,6 +9,8 @@
<property name="javaVmArguments">-server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m ${additionalJvmArgs}</property>
<property name="serverConfig">jbws-testsuite-default.xml</property>
<property name="allowConnectingToRunningServer">true</property>
+ <property name="managementAddress">${jboss.bind.address:localhost}</property>
+ <property name="jbossArguments">${jbossArguments}</property>
<property name="managementPort">${as.managementPort:9990}</property>
<!-- AS7-4070 -->
<property name="waitForPorts">${as.debug.port:8787} ${as.managementPort:9990}</property>
@@ -21,6 +23,8 @@
<property name="javaVmArguments">-server -XX:+UseCompressedOops -Xms48m -Xmx384m -XX:MaxPermSize=192m -Djboss.socket.binding.port-offset=10000 ${additionalJvmArgs}</property>
<property name="serverConfig">jbws-testsuite-ssl-mutual-auth.xml</property>
<property name="allowConnectingToRunningServer">true</property>
+ <property name="managementAddress">${jboss.bind.address:localhost}</property>
+ <property name="jbossArguments">${jbossArguments}</property>
<property name="managementPort">${as.managementPort:19990}</property>
<!-- AS7-4070 -->
<property name="waitForPorts">${as.debug.port:18787} ${as.managementPort:19990}</property>
@@ -33,6 +37,8 @@
<property name="javaVmArguments">-server -XX:+UseCompressedOops -Xms48m -Xmx384m -XX:MaxPermSize=192m -Djboss.socket.binding.port-offset=20000 ${additionalJvmArgs}</property>
<property name="serverConfig">jbws-testsuite-default-config-tests.xml</property>
<property name="allowConnectingToRunningServer">true</property>
+ <property name="managementAddress">${jboss.bind.address:localhost}</property>
+ <property name="jbossArguments">${jbossArguments}</property>
<property name="managementPort">${as.managementPort:29990}</property>
<!-- AS7-4070 -->
<property name="waitForPorts">${as.debug.port:28787} ${as.managementPort:29990}</property>
Modified: stack/cxf/branches/arquillian/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2014-12-23 17:42:45 UTC (rev 19232)
+++ stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2014-12-23 22:14:09 UTC (rev 19233)
@@ -625,6 +625,18 @@
</properties>
</profile>
+ <profile>
+ <id>jbossArguments</id>
+ <activation>
+ <property>
+ <name>!noJBossArguments</name>
+ </property>
+ </activation>
+ <properties>
+ <jbossArguments>-b ${jboss.bind.address:127.0.0.1} -bunsecure=${jboss.bind.address:127.0.0.1} -bmanagement=${jboss.bind.address:127.0.0.1}</jbossArguments>
+ </properties>
+ </profile>
+
<!--
Name: hudson
Descr: Ignore test failures on hudson
9 years, 4 months
JBossWS SVN: r19232 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-12-23 12:42:45 -0500 (Tue, 23 Dec 2014)
New Revision: 19232
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding/HttpJAXBTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding/HttpPayloadTestCase.java
Log:
arquillian migration httpbinding test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding/HttpJAXBTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding/HttpJAXBTestCase.java 2014-12-23 17:25:31 UTC (rev 19231)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding/HttpJAXBTestCase.java 2014-12-23 17:42:45 UTC (rev 19232)
@@ -35,7 +35,15 @@
import javax.xml.ws.Service.Mode;
import javax.xml.ws.http.HTTPBinding;
-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.wsf.test.JBossWSTest;
@@ -50,11 +58,15 @@
* @author Thomas.Diesler(a)jboss.org
* @since 02-Apr-2007
*/
+(a)RunWith(Arquillian.class)
public class HttpJAXBTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-httpbinding-jaxb.war") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-samples-httpbinding-jaxb.war");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.samples.httpbinding.ProviderBeanJAXB.class)
@@ -63,23 +75,20 @@
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/httpbinding/jaxb/META-INF/permissions.xml"), "permissions.xml")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/httpbinding/shared/wsdl/HttpBinding.wsdl"), "wsdl/HttpBinding.wsdl")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/httpbinding/jaxb/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(HttpJAXBTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testWSDLAccess() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-httpbinding-jaxb/ProviderEndpoint?wsdl");
+ URL wsdlURL = new URL(baseURL + "/ProviderEndpoint?wsdl");
Element wsdl = DOMUtils.parse(wsdlURL.openStream());
assertNotNull(wsdl);
}
+ @Test
+ @RunAsClient
public void testProviderDispatch() throws Exception
{
Dispatch<Object> dispatch = createDispatch("ProviderEndpoint");
@@ -97,7 +106,7 @@
String targetNS = "http://org.jboss.ws/httpbinding";
QName serviceName = new QName(targetNS, "ProviderService");
QName portName = new QName(targetNS, "ProviderPort");
- URL endpointAddress = new URL("http://" + getServerHost() + ":8080/jaxws-samples-httpbinding-jaxb/" + target);
+ URL endpointAddress = new URL(baseURL + "/" + target);
Service service = Service.create(serviceName);
service.addPort(portName, HTTPBinding.HTTP_BINDING, endpointAddress.toExternalForm());
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding/HttpPayloadTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding/HttpPayloadTestCase.java 2014-12-23 17:25:31 UTC (rev 19231)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding/HttpPayloadTestCase.java 2014-12-23 17:42:45 UTC (rev 19232)
@@ -36,7 +36,15 @@
import javax.xml.ws.Service.Mode;
import javax.xml.ws.http.HTTPBinding;
-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.wsf.test.JBossWSTest;
@@ -51,13 +59,17 @@
* @author Thomas.Diesler(a)jboss.org
* @since 29-Jun-2006
*/
+(a)RunWith(Arquillian.class)
public class HttpPayloadTestCase extends JBossWSTest
{
private String reqString = "<ns1:somePayload xmlns:ns1='http://org.jboss.ws/httpbinding'>Hello</ns1:somePayload>";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-httpbinding-payload.war") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-samples-httpbinding-payload.war");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.samples.httpbinding.LogicalSourceHandler.class)
@@ -65,23 +77,20 @@
.addAsResource("org/jboss/test/ws/jaxws/samples/httpbinding/httpbinding-handlers.xml")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/httpbinding/shared/wsdl/HttpBinding.wsdl"), "wsdl/HttpBinding.wsdl")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/httpbinding/payload/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(HttpPayloadTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testWSDLAccess() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-httpbinding-payload?wsdl");
+ URL wsdlURL = new URL(baseURL + "?wsdl");
Element wsdl = DOMUtils.parse(wsdlURL.openStream());
assertNotNull(wsdl);
}
+ @Test
+ @RunAsClient
public void testProviderDispatch() throws Exception
{
Dispatch<Source> dispatch = createDispatch("ProviderEndpoint");
@@ -99,7 +108,7 @@
String targetNS = "http://org.jboss.ws/httpbinding";
QName serviceName = new QName(targetNS, "ProviderService");
QName portName = new QName(targetNS, "ProviderPort");
- URL endpointAddress = new URL("http://" + getServerHost() + ":8080/jaxws-samples-httpbinding-payload/" + target);
+ URL endpointAddress = new URL(baseURL + "/" + target);
Service service = Service.create(serviceName);
service.addPort(portName, HTTPBinding.HTTP_BINDING, endpointAddress.toExternalForm());
9 years, 4 months
JBossWS SVN: r19231 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/swaref.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-12-23 12:25:31 -0500 (Tue, 23 Dec 2014)
New Revision: 19231
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/swaref/SWARefTestCase.java
Log:
arquillian migration swaref test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/swaref/SWARefTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/swaref/SWARefTestCase.java 2014-12-23 16:51:49 UTC (rev 19230)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/swaref/SWARefTestCase.java 2014-12-23 17:25:31 UTC (rev 19231)
@@ -29,7 +29,15 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.junit.runner.RunWith;
+import org.junit.Test;
+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.wsf.test.CleanupOperation;
import org.jboss.wsf.test.JBossWSTest;
@@ -42,21 +50,21 @@
*
* @author Heiko.Braun(a)jboss.com
*/
+(a)RunWith(Arquillian.class)
public class SWARefTestCase extends JBossWSTest
{
- private String bareEndpointURL = "http://" + getServerHost() + ":8080/jaxws-swaref/BareEndpointService/BareEndpoint";
- private String wrappedEndpointURL = "http://" + getServerHost() + ":8080/jaxws-swaref/WrappedEndpointService/WrappedEndpoint";
- private String rpclitEndpointURL = "http://" + getServerHost() + ":8080/jaxws-swaref/RpcLitEndpointService/RpcLitEndpoint";
-
private QName bareServiceQName = new QName("http://swaref.samples.jaxws.ws.test.jboss.org/", "BareEndpointService");
private QName wrappedServiceQName = new QName("http://swaref.samples.jaxws.ws.test.jboss.org/", "WrappedEndpointService");
private QName rpcLitServiceQName = new QName("http://swaref.samples.jaxws.ws.test.jboss.org/", "RpcLitEndpointService");
private static DataHandler data;
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-samples-swaref.jar") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static JavaArchive createDeployments() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "jaxws-samples-swaref.jar");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.samples.swaref.BareEndpoint.class)
@@ -72,47 +80,42 @@
.addClass(org.jboss.test.ws.jaxws.samples.swaref.jaxws.BeanAnnotationResponse.class)
.addClass(org.jboss.test.ws.jaxws.samples.swaref.jaxws.ParameterAnnotation.class)
.addClass(org.jboss.test.ws.jaxws.samples.swaref.jaxws.ParameterAnnotationResponse.class);
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(SWARefTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()), new CleanupOperation() {
- @Override
- public void cleanUp() {
- data = null;
- }
- });
- }
-
protected void setUp() throws Exception {
- if (data == null) {
- data = new DataHandler("Client data", "text/plain");
- }
+ data = new DataHandler("Client data", "text/plain");
}
+ @Test
+ @RunAsClient
public void testBeanAnnotationWithBare() throws Exception
{
- Service service = Service.create(new URL(bareEndpointURL +"?wsdl"), bareServiceQName);
+ setUp();
+ Service service = Service.create(new URL(baseURL + "/jaxws-swaref/BareEndpointService/BareEndpoint?wsdl"), bareServiceQName);
BareEndpoint port = service.getPort(BareEndpoint.class);
DocumentPayload response = port.beanAnnotation(new DocumentPayload(data));
assertTrue(response.getData().getContent().equals("Server data"));
}
+ @Test
+ @RunAsClient
public void testBeanAnnotationWithWrapped() throws Exception
{
- Service service = Service.create(new URL(wrappedEndpointURL+"?wsdl"), wrappedServiceQName);
+ setUp();
+ Service service = Service.create(new URL(baseURL+"/jaxws-swaref/WrappedEndpointService/WrappedEndpoint?wsdl"), wrappedServiceQName);
WrappedEndpoint port = service.getPort(WrappedEndpoint.class);
DocumentPayload response = port.beanAnnotation(new DocumentPayload(data), "Wrapped test");
assertTrue(response.getData().getContent().equals("Server data"));
}
+ @Test
+ @RunAsClient
public void testParameterAnnotationWithWrapped() throws Exception
{
- Service service = Service.create(new URL(wrappedEndpointURL+"?wsdl"), wrappedServiceQName);
+ setUp();
+ Service service = Service.create(new URL(baseURL+"/jaxws-swaref/WrappedEndpointService/WrappedEndpoint?wsdl"), wrappedServiceQName);
WrappedEndpoint port = service.getPort(WrappedEndpoint.class);
DataHandler response = port.parameterAnnotation(new DocumentPayload(data), "Wrapped test", data);
@@ -120,9 +123,12 @@
assertTrue("Contents are not equal", response.getContent().equals("Server data"));
}
+ @Test
+ @RunAsClient
public void testBeanAnnotationWithRPC() throws Exception
{
- Service service = Service.create(new URL(rpclitEndpointURL+"?wsdl"), rpcLitServiceQName);
+ setUp();
+ Service service = Service.create(new URL(baseURL+"/jaxws-swaref/RpcLitEndpointService/RpcLitEndpoint?wsdl"), rpcLitServiceQName);
RpcLitEndpoint port = service.getPort(RpcLitEndpoint.class);
DocumentPayload response = port.beanAnnotation( new DocumentPayload(data));
@@ -130,10 +136,13 @@
assertTrue(response.getData().getContent().equals("Server data"));
}
+ @Test
+ @RunAsClient
public void testListAnnotationWithWrapped() throws Exception
{
+ setUp();
//[JBWS-2708]
- Service service = Service.create(new URL(wrappedEndpointURL+"?wsdl"), wrappedServiceQName);
+ Service service = Service.create(new URL(baseURL+"/jaxws-swaref/WrappedEndpointService/WrappedEndpoint?wsdl"), wrappedServiceQName);
WrappedEndpoint port = service.getPort(WrappedEndpoint.class);
DocumentPayloadWithList payload = new DocumentPayloadWithList();
payload.getData().add(data);
9 years, 4 months
JBossWS SVN: r19230 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-12-23 11:51:49 -0500 (Tue, 23 Dec 2014)
New Revision: 19230
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java
Log:
arquillian migration jaxbintros test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java 2014-12-23 16:35:19 UTC (rev 19229)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java 2014-12-23 16:51:49 UTC (rev 19230)
@@ -30,7 +30,15 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.junit.runner.RunWith;
+import org.junit.Test;
+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.common.DOMUtils;
import org.jboss.wsf.test.JBossWSTest;
@@ -47,32 +55,29 @@
*
* @author alessio.soldano(a)jboss.com
*/
+(a)RunWith(Arquillian.class)
public class JAXBIntroTestCase extends JBossWSTest
{
- private final String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-samples-jaxbintros/EndpointService";
+ @ArquillianResource
+ private URL baseURL;
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-samples-jaxbintros.jar") { {
+ @Deployment(testable = false)
+ public static JavaArchive createDeployments() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "jaxws-samples-jaxbintros.jar");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.samples.jaxbintros.Endpoint.class)
.addClass(org.jboss.test.ws.jaxws.samples.jaxbintros.EndpointBean.class)
.addClass(org.jboss.test.ws.jaxws.samples.jaxbintros.UserType.class)
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/jaxbintros/META-INF/jaxb-intros.xml"), "jaxb-intros.xml");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(JAXBIntroTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testWSDLAccess() throws Exception
{
- URL wsdlURL = new URL(endpointAddress + "?wsdl");
+ URL wsdlURL = new URL(baseURL + "/jaxws-samples-jaxbintros/EndpointService?wsdl");
Element wsdl = DOMUtils.parse(wsdlURL.openStream());
assertNotNull(wsdl);
Iterator<Element> it = DOMUtils.getChildElements(wsdl, new QName("http://www.w3.org/2001/XMLSchema","attribute"), true);
@@ -93,9 +98,11 @@
*
* @throws Exception
*/
+ @Test
+ @RunAsClient
public void testAnnotatedUserEndpoint() throws Exception
{
- URL wsdlURL = new URL(endpointAddress + "?wsdl");
+ URL wsdlURL = new URL(baseURL + "/jaxws-samples-jaxbintros/EndpointService?wsdl");
QName serviceName = new QName("http://org.jboss.ws/samples/jaxbintros", "EndpointBeanService");
Service service = Service.create(wsdlURL, serviceName);
9 years, 4 months
JBossWS SVN: r19229 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-12-23 11:35:19 -0500 (Tue, 23 Dec 2014)
New Revision: 19229
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/RetailSampleTestCase.java
Log:
arquillian migration retail test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/RetailSampleTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/RetailSampleTestCase.java 2014-12-23 16:27:37 UTC (rev 19228)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/RetailSampleTestCase.java 2014-12-23 16:35:19 UTC (rev 19229)
@@ -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.JavaArchive;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSTest;
@@ -41,11 +49,15 @@
* @author Heiko Braun <heiko.braun(a)jboss.com>
* @since 08-Nov-2006
*/
+(a)RunWith(Arquillian.class)
public class RetailSampleTestCase extends JBossWSTest {
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-samples-retail.jar") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static JavaArchive createDeployments() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "jaxws-samples-retail.jar");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.jboss.logging\n"))
@@ -69,25 +81,21 @@
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/advanced/retail/META-INF/wsdl/CCVerificationService.wsdl"), "wsdl/CCVerificationService.wsdl")
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/advanced/retail/META-INF/wsdl/OrderMgmtService.wsdl"), "wsdl/OrderMgmtService.wsdl")
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/advanced/retail/META-INF/wsdl/ProfileMgmtService.wsdl"), "wsdl/ProfileMgmtService.wsdl");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(RetailSampleTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
protected OrderMgmt getPort() throws Exception
{
QName serviceName = new QName("http://retail.advanced.samples.jaxws.ws.test.jboss.org/", "OrderMgmtService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-retail/OrderMgmtService/OrderMgmtBean?wsdl");
+ URL wsdlURL = new URL(baseURL + "/jaxws-samples-retail/OrderMgmtService/OrderMgmtBean?wsdl");
Service service = Service.create(wsdlURL, serviceName);
return (OrderMgmt)service.getPort(OrderMgmt.class);
}
+
+ @Test
+ @RunAsClient
public void testWebService() throws Exception
{
Customer customer = new Customer();
9 years, 4 months
JBossWS SVN: r19228 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/oneway.
by jbossws-commits@lists.jboss.org
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(a)jboss.org
* @since 07-Oct-2005
*/
+(a)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);
9 years, 4 months
JBossWS SVN: r19227 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/addressing.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-12-23 11:19:29 -0500 (Tue, 23 Dec 2014)
New Revision: 19227
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java
Log:
arquillian migration addressing test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java 2014-12-23 15:41:01 UTC (rev 19226)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java 2014-12-23 16:19:29 UTC (rev 19227)
@@ -30,7 +30,15 @@
import javax.xml.ws.Service;
import javax.xml.ws.soap.AddressingFeature;
-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.CleanupOperation;
import org.jboss.wsf.test.JBossWSTest;
@@ -45,14 +53,18 @@
* @author alessio.soldano(a)jboss.com
* @since 24-Nov-2005
*/
+(a)RunWith(Arquillian.class)
public class AddressingStatefulTestCase extends JBossWSTest
{
private static AddressingPort port1;
private static AddressingPort port2;
-
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsaddressing.war") { {
+
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-samples-wsaddressing.war");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.samples.addressing.ServerHandler.class)
@@ -60,41 +72,27 @@
.addClass(org.jboss.test.ws.jaxws.samples.addressing.StatefulEndpointImpl.class)
.addAsResource("org/jboss/test/ws/jaxws/samples/addressing/jaxws-handlers.xml")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/addressing/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(AddressingStatefulTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()), new CleanupOperation() {
- @Override
- public void cleanUp() {
- port1 = null;
- port2 = null;
- }
- });
- }
-
- protected void setUp() throws Exception
- {
+ protected void setUp() throws Exception {
super.setUp();
- if (port1 == null || port2 == null)
- {
- URL wsdlURL = new URL(" http://" + getServerHost() + ":8080/jaxws-samples-wsaddressing/TestService?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/samples/wsaddressing", "TestService");
+ URL wsdlURL = new URL(baseURL + "/TestService?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/samples/wsaddressing", "TestService");
- Service service1 = Service.create(wsdlURL, serviceName);
- port1 = new AddressingPort(service1.getPort(StatefulEndpoint.class, new AddressingFeature(true, true)));
+ Service service1 = Service.create(wsdlURL, serviceName);
+ port1 = new AddressingPort(service1.getPort(StatefulEndpoint.class, new AddressingFeature(true, true)));
- Service service2 = Service.create(wsdlURL, serviceName);
- port2 = new AddressingPort(service2.getPort(StatefulEndpoint.class, new AddressingFeature(true, true)));
- }
+ Service service2 = Service.create(wsdlURL, serviceName);
+ port2 = new AddressingPort(service2.getPort(StatefulEndpoint.class, new AddressingFeature(true, true)));
}
+ @Test
+ @RunAsClient
public void testItemLifecycle() throws Exception
{
+ setUp();
firstAddItem();
secondGetItems();
thirdCheckout();
9 years, 4 months
JBossWS SVN: r19226 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-12-23 10:41:01 -0500 (Tue, 23 Dec 2014)
New Revision: 19226
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java
Log:
arquillian migration logicalhandler test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java 2014-12-23 15:21:28 UTC (rev 19225)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java 2014-12-23 15:41:01 UTC (rev 19226)
@@ -30,7 +30,15 @@
import javax.xml.ws.BindingProvider;
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.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSTest;
@@ -45,11 +53,15 @@
* @author Thomas.Diesler(a)jboss.org
* @since 12-Aug-2006
*/
+(a)RunWith(Arquillian.class)
public class LogicalHandlerJAXBTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-logicalhandler-jaxb.war") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-samples-logicalhandler-jaxb.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: com.sun.xml.bind export services\n"))
@@ -63,19 +75,14 @@
.addClass(org.jboss.test.ws.jaxws.samples.logicalhandler.SOAPEndpointJAXBImpl.class)
.addAsResource("org/jboss/test/ws/jaxws/samples/logicalhandler/jaxws-server-jaxb-handlers.xml")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/logicalhandler/WEB-INF/web-jaxb.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(LogicalHandlerJAXBTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testClientAccess() throws Exception
{
- String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-samples-logicalhandler-jaxb";
+ String endpointAddress = baseURL.toString();
QName serviceName = new QName("http://org.jboss.ws/jaxws/samples/logicalhandler", "SOAPEndpointService");
Service service = new SOAPEndpointJAXBService(new URL(endpointAddress + "?wsdl"), serviceName);
SOAPEndpointJAXB port = (SOAPEndpointJAXB)service.getPort(SOAPEndpointJAXB.class);
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java 2014-12-23 15:21:28 UTC (rev 19225)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java 2014-12-23 15:41:01 UTC (rev 19226)
@@ -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 Thomas.Diesler(a)jboss.org
* @since 12-Aug-2006
*/
+(a)RunWith(Arquillian.class)
public class LogicalHandlerSourceTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-logicalhandler-source.war") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-samples-logicalhandler-source.war");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.samples.logicalhandler.Echo.class)
@@ -58,19 +70,14 @@
.addClass(org.jboss.test.ws.jaxws.samples.logicalhandler.SOAPEndpointSourceRpcImpl.class)
.addAsResource("org/jboss/test/ws/jaxws/samples/logicalhandler/jaxws-server-source-handlers.xml")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/logicalhandler/WEB-INF/web-source.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(LogicalHandlerSourceTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testSourceDoc() throws Exception
{
- URL endpointAddress = new URL("http://" + getServerHost() + ":8080/jaxws-samples-logicalhandler-source/doc?wsdl");
+ URL endpointAddress = new URL(baseURL + "/doc?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jaxws/samples/logicalhandler", "SOAPEndpointDocService");
Service service = new SOAPEndpointSourceService(endpointAddress, serviceName);
SOAPEndpointSourceDoc port = (SOAPEndpointSourceDoc)service.getPort(SOAPEndpointSourceDoc.class);
@@ -79,9 +86,11 @@
assertResponse(retStr);
}
+ @Test
+ @RunAsClient
public void testSourceRpc() throws Exception
{
- URL endpointAddress = new URL("http://" + getServerHost() + ":8080/jaxws-samples-logicalhandler-source/rpc?wsdl");
+ URL endpointAddress = new URL(baseURL + "/rpc?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jaxws/samples/logicalhandler", "SOAPEndpointRpcService");
Service service = new SOAPEndpointSourceService(endpointAddress, serviceName);
SOAPEndpointSourceRpc port = (SOAPEndpointSourceRpc)service.getPort(SOAPEndpointSourceRpc.class);
9 years, 4 months
JBossWS SVN: r19225 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-12-23 10:21:28 -0500 (Tue, 23 Dec 2014)
New Revision: 19225
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java
Log:
arquillian migration context test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java 2014-12-23 15:00:36 UTC (rev 19224)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java 2014-12-23 15:21:28 UTC (rev 19225)
@@ -30,7 +30,15 @@
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.junit.runner.RunWith;
+import org.junit.Test;
+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.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.CleanupOperation;
@@ -45,68 +53,68 @@
* @author Thomas.Diesler(a)jboss.org
* @since 29-Apr-2005
*/
+(a)RunWith(Arquillian.class)
public class WebServiceContextEJBTestCase extends JBossWSTest
{
private static Endpoint port;
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-samples-context.jar") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static JavaArchive createDeployments() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "jaxws-samples-context.jar");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.jboss.ws.common\n"))
.addClass(org.jboss.test.ws.jaxws.samples.context.EndpointEJB.class)
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/context/META-INF/jboss.xml"), "jboss.xml");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(WebServiceContextEJBTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()), true, new CleanupOperation() {
- @Override
- public void cleanUp() {
- port = null;
- }
- });
- }
+ public void setUp() throws Exception {
+ URL wsdlURL = new URL(baseURL + "/jaxws-samples-context?wsdl");
+ QName qname = new QName("http://org.jboss.ws/jaxws/context", "EndpointService");
+ Service service = Service.create(wsdlURL, qname);
+ port = (Endpoint) service.getPort(Endpoint.class);
- public void setUp() throws Exception
- {
- if (port == null)
- {
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-context?wsdl");
- QName qname = new QName("http://org.jboss.ws/jaxws/context", "EndpointService");
- Service service = Service.create(wsdlURL, qname);
- port = (Endpoint)service.getPort(Endpoint.class);
-
- BindingProvider bp = (BindingProvider)port;
- bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
- bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
- }
+ BindingProvider bp = (BindingProvider) port;
+ bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
}
+ @Test
+ @RunAsClient
public void testGetWebContext() throws Exception
{
+ setUp();
String retStr = port.testGetMessageContext();
assertEquals("pass", retStr);
}
+ @Test
+ @RunAsClient
public void testMessageContextProperties() throws Exception
{
+ setUp();
String retStr = port.testMessageContextProperties();
assertEquals("pass", retStr);
}
-
+
+ @Test
+ @RunAsClient
public void testGetUserPrincipal() throws Exception
{
+ setUp();
String retStr = port.testGetUserPrincipal();
assertEquals("kermit", retStr);
}
+ @Test
+ @RunAsClient
public void testIsUserInRole() throws Exception
{
+ setUp();
assertTrue("kermit is my friend", port.testIsUserInRole("friend"));
}
}
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java 2014-12-23 15:00:36 UTC (rev 19224)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java 2014-12-23 15:21:28 UTC (rev 19225)
@@ -30,7 +30,15 @@
import javax.xml.ws.BindingProvider;
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.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.CleanupOperation;
@@ -45,13 +53,17 @@
* @author Thomas.Diesler(a)jboss.org
* @since 29-Apr-2005
*/
+(a)RunWith(Arquillian.class)
public class WebServiceContextJSETestCase extends JBossWSTest
{
private static Endpoint port;
-
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-context-jse.war") { {
+
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-samples-context-jse.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.jboss.ws.common\n"))
@@ -59,56 +71,53 @@
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/context/META-INF/permissions.xml"), "permissions.xml")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/context/WEB-INF/jboss-web.xml"), "jboss-web.xml")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/context/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(WebServiceContextJSETestCase.class, JBossWSTestHelper.writeToFile(createDeployments()), true, new CleanupOperation() {
- @Override
- public void cleanUp() {
- port = null;
- }
- });
- }
- public void setUp() throws Exception
- {
- if (port == null)
- {
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-context-jse?wsdl");
- QName qname = new QName("http://org.jboss.ws/jaxws/context", "EndpointService");
- Service service = Service.create(wsdlURL, qname);
- port = (Endpoint)service.getPort(Endpoint.class);
-
- BindingProvider bp = (BindingProvider)port;
- bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
- bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
- }
+ public void setUp() throws Exception {
+ URL wsdlURL = new URL(baseURL + "/jaxws-samples-context-jse?wsdl");
+ QName qname = new QName("http://org.jboss.ws/jaxws/context", "EndpointService");
+ Service service = Service.create(wsdlURL, qname);
+ port = (Endpoint) service.getPort(Endpoint.class);
+
+ BindingProvider bp = (BindingProvider) port;
+ bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
}
+ @Test
+ @RunAsClient
public void testGetWebContext() throws Exception
{
+ setUp();
String retStr = port.testGetMessageContext();
assertEquals("pass", retStr);
}
+ @Test
+ @RunAsClient
public void testMessageContextProperties() throws Exception
{
+ setUp();
String retStr = port.testMessageContextProperties();
assertEquals("pass", retStr);
}
+ @Test
+ @RunAsClient
public void testGetUserPrincipal() throws Exception
{
+ setUp();
String retStr = port.testGetUserPrincipal();
assertEquals("kermit", retStr);
}
+ @Test
+ @RunAsClient
public void testIsUserInRole() throws Exception
{
+ setUp();
assertTrue("kermit is my friend", port.testIsUserInRole("friend"));
}
}
9 years, 4 months
JBossWS SVN: r19224 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/endpointReference.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-12-23 10:00:36 -0500 (Tue, 23 Dec 2014)
New Revision: 19224
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceTestCase.java
Log:
arquillian migration endpointReference test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceTestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceTestCase.java 2014-12-23 14:32:09 UTC (rev 19223)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceTestCase.java 2014-12-23 15:00:36 UTC (rev 19224)
@@ -37,7 +37,15 @@
import javax.xml.ws.soap.AddressingFeature;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-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.common.DOMUtils;
import org.jboss.wsf.test.JBossWSTest;
@@ -54,52 +62,57 @@
* @author ropalka(a)redhat.com
* @since 13-Jan-2009
*/
+(a)RunWith(Arquillian.class)
public class EndpointReferenceTestCase extends JBossWSTest
{
- private static final String ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-endpointReference";
- private static final String ENDPOINT_WSDL = ENDPOINT_ADDRESS + "?wsdl";
private static final String WSDL_NS = "http://org.jboss.ws/endpointReference";
private static final QName SERVICE_QNAME = new QName(WSDL_NS, "EndpointService");
private static final QName PORT_QNAME = new QName(WSDL_NS, "EndpointPort");
private Service service;
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-endpointReference.jar") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static JavaArchive createDeployments() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "jaxws-endpointReference.jar");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.endpointReference.Endpoint.class)
.addClass(org.jboss.test.ws.jaxws.endpointReference.EndpointImpl.class);
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(EndpointReferenceTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
public void setUp() throws Exception
{
- this.service = Service.create(new URL(ENDPOINT_WSDL), SERVICE_QNAME);
+ URL wsdlURL = new URL(baseURL + "/jaxws-endpointReference?wsdl");
+ this.service = Service.create(wsdlURL, SERVICE_QNAME);
}
+ @Test
+ @RunAsClient
public void testDispatch() throws Exception
{
+ setUp();
final Dispatch<Source> dispatch = this.service.createDispatch(PORT_QNAME, Source.class, Mode.PAYLOAD);
this.validateEndpointReferences(dispatch);
}
+ @Test
+ @RunAsClient
public void testDispatchWithFeatures() throws Exception
{
+ setUp();
final Dispatch<Source> dispatch = this.service.createDispatch(PORT_QNAME, Source.class, Mode.PAYLOAD, new AddressingFeature(false, false));
this.validateEndpointReferences(dispatch);
}
+ @Test
+ @RunAsClient
public void testPort() throws Exception
{
+ setUp();
final Endpoint port = this.service.getPort(Endpoint.class);
this.validateEndpointReferences((BindingProvider)port);
}
@@ -143,6 +156,7 @@
assertEquals(1, addresses.getLength());
String eprAddress = addresses.item(0).getFirstChild().getNodeValue();
eprAddress = eprAddress.replace("127.0.0.1", "localhost");
+ String ENDPOINT_ADDRESS = baseURL.toString() + "/jaxws-endpointReference";
assertEquals(ENDPOINT_ADDRESS.replace("127.0.0.1", "localhost"), eprAddress);
}
9 years, 4 months