[jbossws-commits] JBossWS SVN: r19215 - stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2009.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Mon Dec 22 21:12:44 EST 2014
Author: rsearls
Date: 2014-12-22 21:12:44 -0500 (Mon, 22 Dec 2014)
New Revision: 19215
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2009/JBWS2009TestCase.java
Log:
arquillian migration jbws2009 test
Modified: stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2009/JBWS2009TestCase.java
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2009/JBWS2009TestCase.java 2014-12-23 02:00:54 UTC (rev 19214)
+++ stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2009/JBWS2009TestCase.java 2014-12-23 02:12:44 UTC (rev 19215)
@@ -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.test.ws.jaxws.jbws2009.generated.CountryCodeType;
import org.jboss.test.ws.jaxws.jbws2009.generated.CurrencyCodeType;
@@ -46,14 +54,18 @@
* @author thomas.diesler at jboss.com
* @since 16-Oct-2007
*/
+ at RunWith(Arquillian.class)
public class JBWS2009TestCase extends JBossWSTest
{
private String targetNS = "http://jbws2009.jaxws.ws.test.jboss.org/";
private ServiceType proxy;
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-jbws2009.war") { {
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-jbws2009.war");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.jbws2009.ServiceImpl.class)
@@ -62,15 +74,9 @@
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/jbws2009/WEB-INF/wsdl/schema/common/1.0-SNAPSHOT/CoreComponentTypes.xsd"), "wsdl/schema/common/1.0-SNAPSHOT/CoreComponentTypes.xsd")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/jbws2009/WEB-INF/wsdl/schema/imported/my-service/1.0-SNAPSHOT/BaseComponents.xsd"), "wsdl/schema/imported/my-service/1.0-SNAPSHOT/BaseComponents.xsd")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/jbws2009/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS2009TestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
- }
@Override
protected void setUp() throws Exception
@@ -78,30 +84,39 @@
super.setUp();
QName serviceName = new QName(targetNS, "EndpointService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws2009/Service?wsdl");
+ URL wsdlURL = new URL(baseURL + "/Service?wsdl");
Service service = Service.create(wsdlURL, serviceName);
proxy = service.getPort(ServiceType.class);
}
-
+
+ @Test
+ @RunAsClient
public void testCountryCodes() throws Exception
{
+ setUp();
Response response = proxy.getCountryCodes();
List<CountryCodeType> countryCodes = response.getCountry();
assertEquals(countryCodes.get(0), CountryCodeType.CZ);
assertEquals(countryCodes.get(1), CountryCodeType.DE);
}
+ @Test
+ @RunAsClient
public void testCurrencyCodes() throws Exception
{
+ setUp();
org.jboss.test.ws.jaxws.jbws2009.generated.GetCurrencyCodesResponse.Response response = proxy.getCurrencyCodes();
List<CurrencyCodeType> currencyCodes = response.getCurrency();
assertEquals(currencyCodes.get(0), CurrencyCodeType.CZK);
assertEquals(currencyCodes.get(1), CurrencyCodeType.EUR);
}
-
+
+ @Test
+ @RunAsClient
public void test() throws Exception
{
+ setUp();
assertEquals(CurrencyCodeType.CZK, proxy.getCurrency(CountryCodeType.CZ));
assertEquals(CurrencyCodeType.EUR, proxy.getCurrency(CountryCodeType.DE));
}
More information about the jbossws-commits
mailing list