[jbossws-commits] JBossWS SVN: r19252 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws944.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Wed Dec 24 15:29:41 EST 2014
Author: rsearls
Date: 2014-12-24 15:29:41 -0500 (Wed, 24 Dec 2014)
New Revision: 19252
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
Log:
arquillian migration jbws944 test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2014-12-24 20:20:00 UTC (rev 19251)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2014-12-24 20:29:41 UTC (rev 19252)
@@ -33,7 +33,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.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
@@ -49,29 +57,26 @@
* @author Jason.Greene at jboss.com
* @since 29-Apr-2005
*/
+ at RunWith(Arquillian.class)
public class JBWS944TestCase extends JBossWSTest
{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws944/FooBean01";
+ @ArquillianResource
+ private URL baseURL;
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-jbws944.jar") { {
+ @Deployment(testable = false)
+ public static JavaArchive createDeployments() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "jaxws-jbws944.jar");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.jbws944.EJB3Bean01.class)
.addClass(org.jboss.test.ws.jaxws.jbws944.EJB3RemoteBusinessInterface.class)
.addClass(org.jboss.test.ws.jaxws.jbws944.EJB3RemoteHome.class)
.addClass(org.jboss.test.ws.jaxws.jbws944.EJB3RemoteInterface.class);
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS944TestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testRemoteAccess() throws Exception
{
InitialContext iniCtx = null;
@@ -94,6 +99,8 @@
// This tests whether the remote proxy also implements
// the home interface and that it can be narrowed to it.
+ @Test
+ @RunAsClient
public void testNarrowedRemoteAccess() throws Exception
{
InitialContext iniCtx = null;
@@ -116,13 +123,15 @@
}
}
+ @Test
+ @RunAsClient
public void testWebService() throws Exception
{
assertWSDLAccess();
String helloWorld = "Hello world!";
QName serviceName = new QName("http://org.jboss.ws/jbws944", "EJB3BeanService");
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ URL wsdlURL = new URL(baseURL + "/jaxws-jbws944/FooBean01?wsdl");
Service service = Service.create(wsdlURL, serviceName);
EndpointInterface port = (EndpointInterface)service.getPort(EndpointInterface.class);
String retObj = port.echo(helloWorld);
@@ -131,7 +140,7 @@
private void assertWSDLAccess() throws Exception
{
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ URL wsdlURL = new URL(baseURL + "/jaxws-jbws944/FooBean01?wsdl");
WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString());
assertNotNull(wsdlDefinition);
More information about the jbossws-commits
mailing list