You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2007/03/08 18:15:05 UTC
svn commit: r516103 [8/11] - in /incubator/cxf/trunk: ./
common/common/src/test/java/org/apache/cxf/common/annotation/
common/common/src/test/java/org/apache/cxf/common/classloader/
common/common/src/test/java/org/apache/cxf/common/commands/ common/com...
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java Thu Mar 8 09:14:44 2007
@@ -27,27 +27,25 @@
import javax.xml.ws.Endpoint;
import javax.xml.ws.WebServiceException;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.apache.cxf.connector.Connection;
import org.apache.cxf.jca.cxf.CXFConnectionRequestInfo;
import org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
import org.apache.hello_world_soap_http.Greeter;
import org.apache.hello_world_soap_http.GreeterImpl;
import org.apache.hello_world_soap_http.SOAPService;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class OutBoundConnectionTest extends ClientServerTestBase {
+public class OutBoundConnectionTest extends AbstractBusClientServerTestBase {
private final QName serviceName = new QName("http://apache.org/hello_world_soap_http",
"SOAPService");
private final QName portName = new QName("http://apache.org/hello_world_soap_http",
"SoapPort");
- public static class Server extends TestServerBase {
+ public static class Server extends AbstractBusTestServerBase {
protected void run() {
Object implementor = new GreeterImpl();
@@ -69,15 +67,12 @@
}
}
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(OutBoundConnectionTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly", launchServer(Server.class));
- }
- };
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class));
}
+ @Test
public void testBasicConnection() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
assertNotNull(wsdl);
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/EmbeddedJMSBrokerLauncher.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/EmbeddedJMSBrokerLauncher.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/EmbeddedJMSBrokerLauncher.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/EmbeddedJMSBrokerLauncher.java Thu Mar 8 09:14:44 2007
@@ -20,11 +20,11 @@
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-public class EmbeddedJMSBrokerLauncher extends TestServerBase {
+public class EmbeddedJMSBrokerLauncher extends AbstractBusTestServerBase {
BrokerService broker;
final String brokerUrl1 = "tcp://localhost:61500";
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java Thu Mar 8 09:14:44 2007
@@ -28,9 +28,6 @@
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.apache.cxf.hello_world_jms.BadRecordLitFault;
import org.apache.cxf.hello_world_jms.HelloWorldOneWayPort;
import org.apache.cxf.hello_world_jms.HelloWorldOneWayQueueService;
@@ -39,40 +36,38 @@
import org.apache.cxf.hello_world_jms.HelloWorldPubSubService;
import org.apache.cxf.hello_world_jms.HelloWorldService;
import org.apache.cxf.hello_world_jms.NoSuchCodeLitFault;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.transport.jms.JMSConstants;
import org.apache.cxf.transport.jms.JMSMessageHeadersType;
import org.apache.cxf.transport.jms.JMSPropertyType;
import org.apache.hello_world_doc_lit.Greeter;
import org.apache.hello_world_doc_lit.PingMeFault;
import org.apache.hello_world_doc_lit.SOAPService2;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class JMSClientServerTest extends ClientServerTestBase {
+public class JMSClientServerTest extends AbstractBusClientServerTestBase {
private QName serviceName;
private QName portName;
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(JMSClientServerTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- Map<String, String> props = new HashMap<String, String>();
- if (System.getProperty("activemq.store.dir") != null) {
- props.put("activemq.store.dir", System.getProperty("activemq.store.dir"));
- }
- props.put("java.util.logging.config.file",
- System.getProperty("java.util.logging.config.file"));
-
- assertTrue("server did not launch correctly",
- launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
+ @BeforeClass
+ public static void startServers() throws Exception {
+ Map<String, String> props = new HashMap<String, String>();
+ if (System.getProperty("activemq.store.dir") != null) {
+ props.put("activemq.store.dir", System.getProperty("activemq.store.dir"));
+ }
+ props.put("java.util.logging.config.file",
+ System.getProperty("java.util.logging.config.file"));
+
+ assertTrue("server did not launch correctly",
+ launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
- assertTrue("server did not launch correctly",
- launchServer(Server.class, false));
- }
- };
- }
+ assertTrue("server did not launch correctly",
+ launchServer(Server.class, false));
+ }
+ @Test
public void testDocBasicConnection() throws Exception {
serviceName = new QName("http://apache.org/hello_world_doc_lit",
"SOAPService2");
@@ -110,6 +105,7 @@
}
}
+ @Test
public void testBasicConnection() throws Exception {
serviceName = new QName("http://cxf.apache.org/hello_world_jms",
"HelloWorldService");
@@ -154,6 +150,7 @@
}
}
+ @Test
public void testOneWayTopicConnection() throws Exception {
serviceName = new QName("http://cxf.apache.org/hello_world_jms",
"HelloWorldPubSubService");
@@ -177,6 +174,7 @@
}
}
+ @Test
public void testOneWayQueueConnection() throws Exception {
serviceName = new QName("http://cxf.apache.org/hello_world_jms",
"HelloWorldOneWayQueueService");
@@ -200,6 +198,7 @@
}
}
+ @Test
public void testContextPropogation() throws Exception {
final String testReturnPropertyName = "Test_Prop";
final String testIgnoredPropertyName = "Test_Prop_No_Return";
@@ -259,8 +258,4 @@
}
}
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(JMSClientServerTest.class);
- }
}
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/Server.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/Server.java Thu Mar 8 09:14:44 2007
@@ -20,9 +20,9 @@
import javax.xml.ws.Endpoint;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-public class Server extends TestServerBase {
+public class Server extends AbstractBusTestServerBase {
protected void run() {
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/js/JSClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/js/JSClientServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/js/JSClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/js/JSClientServerTest.java Thu Mar 8 09:14:44 2007
@@ -24,30 +24,25 @@
import javax.xml.namespace.QName;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.hello_world_soap_http.Greeter;
import org.apache.hello_world_soap_http.SOAPService;
import org.apache.hello_world_soap_http.SOAPServiceTest1;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class JSClientServerTest extends ClientServerTestBase {
+public class JSClientServerTest extends AbstractBusClientServerTestBase {
private static final String NS = "http://apache.org/hello_world_soap_http";
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(JSClientServerTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly", launchServer(Server.class));
- }
- };
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class));
}
+ @Test
public void testJSMessageMode() throws Exception {
QName serviceName = new QName(NS, "SOAPService");
QName portName = new QName(NS, "SoapPort");
@@ -75,6 +70,7 @@
}
}
+ @Test
public void testJSPayloadMode() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
assertNotNull(wsdl);
@@ -102,7 +98,4 @@
}
}
- public static void main(String[] args) {
- junit.textui.TestRunner.run(JSClientServerTest.class);
- }
}
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/js/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/js/Server.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/js/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/js/Server.java Thu Mar 8 09:14:44 2007
@@ -23,9 +23,9 @@
import java.net.URLDecoder;
import org.apache.cxf.js.rhino.ProviderFactory;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-public class Server extends TestServerBase {
+public class Server extends AbstractBusTestServerBase {
protected void run() {
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/ManagedBusTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/ManagedBusTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/ManagedBusTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/ManagedBusTest.java Thu Mar 8 09:14:44 2007
@@ -25,17 +25,18 @@
import javax.management.MBeanServer;
import javax.management.ObjectName;
-import junit.framework.TestCase;
-
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.management.InstrumentationManager;
import org.apache.cxf.management.ManagementConstants;
import org.apache.cxf.management.jmx.InstrumentationManagerImpl;
import org.apache.cxf.workqueue.WorkQueueManager;
+import org.junit.Assert;
+import org.junit.Test;
-public class ManagedBusTest extends TestCase {
+public class ManagedBusTest extends Assert {
+ @Test
public void testManagedSpringBus() throws Exception {
SpringBusFactory factory = new SpringBusFactory();
Bus bus = factory.createBus();
@@ -53,6 +54,7 @@
bus.shutdown(true);
}
+ @Test
public void testManagedBusWithConfig() throws Exception {
SpringBusFactory factory = new SpringBusFactory();
Bus bus = factory.createBus("org/apache/cxf/systest/management/managed-spring.xml", true);
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java Thu Mar 8 09:14:44 2007
@@ -28,9 +28,6 @@
import javax.xml.ws.Holder;
import javax.xml.ws.soap.SOAPBinding;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.endpoint.Client;
@@ -44,23 +41,24 @@
import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
import org.apache.cxf.service.model.EndpointInfo;
import org.apache.cxf.service.model.ServiceInfo;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class ClientMtomXopTest extends ClientServerTestBase {
+public class ClientMtomXopTest extends AbstractBusClientServerTestBase {
public static final QName MTOM_PORT = new QName("http://cxf.apache.org/mime", "TestMtomPort");
public static final QName MTOM_SERVICE = new QName("http://cxf.apache.org/mime", "TestMtomService");
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(ClientMtomXopTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly", launchServer(Server.class));
- }
- };
+
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class));
}
+
/*
+ @Test
+ @Ignore
public void testMtomSWA() throws Exception {
TestMtom mtomPort = createPort(MTOM_SERVICE, MTOM_PORT, TestMtom.class);
try {
@@ -87,6 +85,8 @@
}
}
*/
+
+ @Test
public void testMtomXop() throws Exception {
TestMtom mtomPort = createPort(MTOM_SERVICE, MTOM_PORT, TestMtom.class);
try {
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java Thu Mar 8 09:14:44 2007
@@ -40,8 +40,11 @@
import org.apache.cxf.transport.Conduit;
import org.apache.cxf.transport.ConduitInitiator;
import org.apache.cxf.transport.ConduitInitiatorManager;
+import org.junit.Test;
public class MtomServerTest extends AbstractCXFTest {
+
+ @Test
public void testMtomRequest() throws Exception {
JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
sf.setServiceClass(EchoService.class);
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/Server.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/Server.java Thu Mar 8 09:14:44 2007
@@ -34,11 +34,11 @@
import org.apache.cxf.service.Service;
import org.apache.cxf.service.factory.AbstractServiceFactoryBean;
import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
import org.apache.cxf.transport.ChainInitiationObserver;
import org.apache.cxf.transport.MessageObserver;
-public class Server extends TestServerBase {
+public class Server extends AbstractBusTestServerBase {
protected void run() {
Object implementor = new TestMtomImpl();
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/AttachmentProviderXMLClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/AttachmentProviderXMLClientServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/AttachmentProviderXMLClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/AttachmentProviderXMLClientServerTest.java Thu Mar 8 09:14:44 2007
@@ -31,18 +31,16 @@
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.apache.cxf.common.util.Base64Utility;
import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class AttachmentProviderXMLClientServerTest extends ClientServerTestBase {
+public class AttachmentProviderXMLClientServerTest extends AbstractBusClientServerTestBase {
- public static class Server extends TestServerBase {
+ public static class Server extends AbstractBusTestServerBase {
protected void run() {
Object implementor = new AttachmentStreamSourceXMLProvider();
@@ -63,16 +61,13 @@
}
}
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(AttachmentProviderXMLClientServerTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly",
- launchServer(Server.class));
- }
- };
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly",
+ launchServer(Server.class));
}
+ @Test
public void testRequestWithAttachment() throws Exception {
HttpURLConnection connection =
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderClientServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderClientServerTest.java Thu Mar 8 09:14:44 2007
@@ -25,17 +25,15 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Endpoint;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
import org.apache.hello_world_soap_http.Greeter;
import org.apache.hello_world_soap_http.SOAPService;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class ProviderClientServerTest extends ClientServerTestBase {
- public static class Server extends TestServerBase {
+public class ProviderClientServerTest extends AbstractBusClientServerTestBase {
+ public static class Server extends AbstractBusTestServerBase {
protected void run() {
Object implementor = new HWSoapMessageDocProvider();
@@ -56,15 +54,12 @@
}
}
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(ProviderClientServerTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly", launchServer(Server.class));
- }
- };
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class));
}
+ @Test
public void testSOAPMessageModeDocLit() throws Exception {
QName serviceName =
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java Thu Mar 8 09:14:44 2007
@@ -24,23 +24,17 @@
import javax.xml.namespace.QName;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.hello_world_rpclit.GreeterRPCLit;
import org.apache.hello_world_rpclit.SOAPServiceRPCLit;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class ProviderRPCClientServerTest extends ClientServerTestBase {
+public class ProviderRPCClientServerTest extends AbstractBusClientServerTestBase {
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(ProviderRPCClientServerTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly", launchServer(Server.class));
- }
- };
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class));
}
private void doGreeterRPCLit(SOAPServiceRPCLit service, QName portName, int count) throws Exception {
@@ -62,6 +56,7 @@
}
}
+ @Test
public void testSOAPMessageModeRPC() throws Exception {
QName serviceName = new QName("http://apache.org/hello_world_rpclit", "SOAPServiceProviderRPCLit");
@@ -76,6 +71,7 @@
doGreeterRPCLit(service, portName, 2);
}
+ @Test
public void testSOAPMessageModeWithDOMSourceData() throws Exception {
QName serviceName = new QName("http://apache.org/hello_world_rpclit", "SOAPServiceProviderRPCLit");
QName portName = new QName("http://apache.org/hello_world_rpclit", "SoapPortProviderRPCLit2");
@@ -89,6 +85,7 @@
doGreeterRPCLit(service, portName, 2);
}
+ @Test
public void testPayloadModeWithDOMSourceData() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
assertNotNull(wsdl);
@@ -102,6 +99,7 @@
doGreeterRPCLit(service, portName, 1);
}
+ @Test
public void testMessageModeWithSAXSourceData() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
assertNotNull(wsdl);
@@ -115,6 +113,7 @@
doGreeterRPCLit(service, portName, 1);
}
+ @Test
public void testMessageModeWithStreamSourceData() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
assertNotNull(wsdl);
@@ -128,6 +127,7 @@
doGreeterRPCLit(service, portName, 1);
}
+ @Test
public void testPayloadModeWithSAXSourceData() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
assertNotNull(wsdl);
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderXMLClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderXMLClientServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderXMLClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderXMLClientServerTest.java Thu Mar 8 09:14:44 2007
@@ -31,23 +31,21 @@
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.apache.cxf.helpers.XMLUtils;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
import org.apache.hello_world_xml_http.wrapped.XMLService;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class ProviderXMLClientServerTest extends ClientServerTestBase {
+public class ProviderXMLClientServerTest extends AbstractBusClientServerTestBase {
private final QName serviceName = new QName(
"http://apache.org/hello_world_xml_http/wrapped", "XMLService");
private final QName portName = new QName(
"http://apache.org/hello_world_xml_http/wrapped", "XMLProviderPort");
- public static class Server extends TestServerBase {
+ public static class Server extends AbstractBusTestServerBase {
protected void run() {
Object implementor = new HWDOMSourcePayloadXMLBindingProvider();
@@ -68,16 +66,13 @@
}
}
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(ProviderXMLClientServerTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly",
- launchServer(Server.class));
- }
- };
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly",
+ launchServer(Server.class));
}
+ @Test
public void testDOMSourcePAYLOAD() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world_xml_wrapped.wsdl");
assertNotNull(wsdl);
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/Server.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/Server.java Thu Mar 8 09:14:44 2007
@@ -21,9 +21,9 @@
import javax.xml.ws.Endpoint;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-public class Server extends TestServerBase {
+public class Server extends AbstractBusTestServerBase {
protected void run() {
Object implementor = new HWSoapMessageProvider();
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/HttpBindingServer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/HttpBindingServer.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/HttpBindingServer.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/HttpBindingServer.java Thu Mar 8 09:14:44 2007
@@ -22,9 +22,9 @@
import javax.xml.ws.Endpoint;
import javax.xml.ws.http.HTTPBinding;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-public class HttpBindingServer extends TestServerBase {
+public class HttpBindingServer extends AbstractBusTestServerBase {
protected void run() {
Endpoint e = Endpoint.create(HTTPBinding.HTTP_BINDING, new RestSourcePayloadProviderHttpBinding());
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerHttpBindingTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerHttpBindingTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerHttpBindingTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerHttpBindingTest.java Thu Mar 8 09:14:44 2007
@@ -41,14 +41,12 @@
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.http.HTTPBinding;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class RestClientServerHttpBindingTest extends ClientServerTestBase {
+public class RestClientServerHttpBindingTest extends AbstractBusClientServerTestBase {
private final QName serviceName = new QName("http://apache.org/hello_world_xml_http/wrapped",
"XMLService");
@@ -58,21 +56,19 @@
private final String endpointAddress =
"http://localhost:9024/XMLService/RestProviderPort/Customer";
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(RestClientServerHttpBindingTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly", launchServer(HttpBindingServer.class));
- }
- };
- }
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(HttpBindingServer.class));
+ }
+ @Test
public void testHttpGET() throws Exception {
URL url = new URL(endpointAddress + "?name=john&address=20");
InputStream in = url.openStream();
assertNotNull(in);
}
+ @Test
public void testHttpPOSTDispatchHTTPBinding() throws Exception {
Service service = Service.create(serviceName);
service.addPort(portName, HTTPBinding.HTTP_BINDING, endpointAddress);
@@ -86,6 +82,7 @@
assertTrue("Result should have CustomerID", tempstring.lastIndexOf("CustomerID>123456<") > 0);
}
+ @Test
public void testHttpGETDispatchHTTPBinding() throws Exception {
Service service = Service.create(serviceName);
URI endpointURI = new URI(endpointAddress);
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerTest.java Thu Mar 8 09:14:44 2007
@@ -45,16 +45,14 @@
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.helpers.XMLUtils;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.hello_world_xml_http.wrapped.XMLService;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class RestClientServerTest extends ClientServerTestBase {
+public class RestClientServerTest extends AbstractBusClientServerTestBase {
private final QName serviceName = new QName("http://apache.org/hello_world_xml_http/wrapped",
"XMLService");
@@ -64,15 +62,12 @@
private final String endpointAddress =
"http://localhost:9023/XMLService/RestProviderPort/Customer";
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(RestClientServerTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly", launchServer(Server.class));
- }
- };
- }
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class));
+ }
+ @Test
public void testHttpPOSTDispatchXMLBinding() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world_xml_wrapped.wsdl");
assertNotNull(wsdl);
@@ -93,12 +88,14 @@
assertEquals("Customer", respDoc.getFirstChild().getLocalName());
}
+ @Test
public void testHttpGET() throws Exception {
URL url = new URL(endpointAddress + "?name=john&address=20");
InputStream in = url.openStream();
assertNotNull(in);
}
+ @Test
public void testHttpPOSTDispatchHTTPBinding() throws Exception {
Service service = Service.create(serviceName);
service.addPort(portName, HTTPBinding.HTTP_BINDING, endpointAddress);
@@ -112,6 +109,7 @@
assertTrue("Result should have CustomerID", tempstring.lastIndexOf("CustomerID>123456<") > 0);
}
+ @Test
public void testHttpGETDispatchHTTPBinding() throws Exception {
Service service = Service.create(serviceName);
URI endpointURI = new URI(endpointAddress);
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/Server.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/rest/Server.java Thu Mar 8 09:14:44 2007
@@ -21,9 +21,9 @@
import javax.xml.ws.Endpoint;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-public class Server extends TestServerBase {
+public class Server extends AbstractBusTestServerBase {
protected void run() {
Object implementor = new RestSourcePayloadProvider();
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java Thu Mar 8 09:14:44 2007
@@ -25,43 +25,36 @@
import javax.xml.namespace.QName;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.schema_validation.SchemaValidation;
import org.apache.schema_validation.SchemaValidationService;
import org.apache.schema_validation.types.ComplexStruct;
import org.apache.schema_validation.types.OccuringStruct;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class ValidationClientServerTest extends ClientServerTestBase {
+public class ValidationClientServerTest extends AbstractBusClientServerTestBase {
private final QName serviceName = new QName("http://apache.org/schema_validation",
"SchemaValidationService");
private final QName portName = new QName("http://apache.org/schema_validation", "SoapPort");
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(ValidationClientServerTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly", launchServer(ValidationServer.class));
- }
-
- public void setUp() throws Exception {
- // set up configuration to enable schema validation
- URL url = getClass().getResource("cxf-config.xml");
- assertNotNull("cannot find test resource", url);
- configFileName = url.toString();
- super.setUp();
- }
- };
+
+ @BeforeClass
+ public static void startservers() throws Exception {
+ // set up configuration to enable schema validation
+ URL url = ValidationClientServerTest.class.getResource("cxf-config.xml");
+ assertNotNull("cannot find test resource", url);
+ defaultConfigFileName = url.toString();
+
+ assertTrue("server did not launch correctly", launchServer(ValidationServer.class));
}
// TODO : Change this test so that we test the combinations of
// client and server with schema validation enabled/disabled...
// Only tests client side validation enabled/server side disabled.
+ @Test
public void testSchemaValidation() throws Exception {
System.setProperty("cxf.config.file.url", getClass().getResource("cxf-config.xml").toString());
URL wsdl = getClass().getResource("/wsdl/schema_validation.wsdl");
@@ -130,10 +123,6 @@
String expected = "'{\"http://apache.org/schema_validation/types\":varFloat}' is expected.";
assertTrue(e.getMessage().indexOf(expected) != -1);
}
- }
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(ValidationClientServerTest.class);
}
}
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java Thu Mar 8 09:14:44 2007
@@ -23,9 +23,9 @@
import javax.xml.ws.Endpoint;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-public class ValidationServer extends TestServerBase {
+public class ValidationServer extends AbstractBusTestServerBase {
private String oldConfig;
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java Thu Mar 8 09:14:44 2007
@@ -33,11 +33,14 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.test.AbstractCXFTest;
+import org.junit.After;
+import org.junit.Before;
public abstract class AbstractServletTest extends AbstractCXFTest {
protected ServletRunner sr;
+ @Before
public void setUp() throws Exception {
sr = new ServletRunner(getResourceAsStream(getConfiguration()));
@@ -46,11 +49,12 @@
} catch (HttpNotFoundException e) {
// ignore, we just want to boot up the servlet
}
- super.setUp();
+ super.setUpBus();
HttpUnitOptions.setExceptionsThrownOnErrorStatus(true);
}
+ @After
public void tearDown() {
BusFactory.getDefaultBus().shutdown(false);
BusFactory.setDefaultBus(null);
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java Thu Mar 8 09:14:44 2007
@@ -33,6 +33,8 @@
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.apache.cxf.service.invoker.BeanInvoker;
import org.apache.hello_world_soap_http.GreeterImpl;
+import org.junit.Ignore;
+import org.junit.Test;
public class CXFServletTest extends AbstractServletTest {
@@ -54,6 +56,7 @@
}
+ @Test
public void testPostInvokeServices() throws Exception {
setupJaxwsService();
@@ -84,6 +87,7 @@
assertValid("//h:sayHiResponse", doc);
}
+ @Test
public void testGetServiceList() throws Exception {
ServletUnitClient client = newClient();
setupJaxwsService();
@@ -96,6 +100,7 @@
assertEquals("text/html", res.getContentType());
}
+ @Test
public void testGetWSDL() throws Exception {
ServletUnitClient client = newClient();
setupJaxwsService();
@@ -110,6 +115,7 @@
res.getText().contains("<wsdl:operation name=\"greetMe\">"));
}
+ @Test
public void testInvalidServiceUrl() throws Exception {
ServletUnitClient client = newClient();
client.setExceptionsThrownOnErrorStatus(false);
@@ -119,7 +125,9 @@
assertEquals("text/html", res.getContentType());
}
- public void xtestServiceWsdlNotFound() throws Exception {
+ @Test
+ @Ignore
+ public void testServiceWsdlNotFound() throws Exception {
WebRequest req = new GetMethodWebRequest("http://localhost/services/NoSuchService?wsdl");
expectErrorCode(req, 404, "Response code 404 required for invalid WSDL url.");
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java Thu Mar 8 09:14:44 2007
@@ -25,6 +25,7 @@
import com.meterware.httpunit.WebResponse;
import org.apache.cxf.helpers.DOMUtils;
+import org.junit.Test;
public class ExternalServicesServletTest extends AbstractServletTest {
@@ -33,6 +34,7 @@
return "/org/apache/cxf/systest/servlet/web-external.xml";
}
+ @Test
public void testPostInvokeServices() throws Exception {
newClient();
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/JsFrontEndServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/JsFrontEndServletTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/JsFrontEndServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/JsFrontEndServletTest.java Thu Mar 8 09:14:44 2007
@@ -25,6 +25,7 @@
import com.meterware.httpunit.WebResponse;
import org.apache.cxf.helpers.DOMUtils;
+import org.junit.Test;
public class JsFrontEndServletTest extends AbstractServletTest {
@@ -32,6 +33,7 @@
return "/org/apache/cxf/systest/servlet/web-js.xml";
}
+ @Test
public void testPostInvokeServices() throws Exception {
WebRequest req = new PostMethodWebRequest("http://localhost/services/Greeter",
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java Thu Mar 8 09:14:44 2007
@@ -25,6 +25,7 @@
import com.meterware.httpunit.WebResponse;
import org.apache.cxf.helpers.DOMUtils;
+import org.junit.Test;
public class SpringServletTest extends AbstractServletTest {
@Override
@@ -32,6 +33,7 @@
return "/org/apache/cxf/systest/servlet/web-spring.xml";
}
+ @Test
public void testInvokingSpringBeans() throws Exception {
WebRequest req = new PostMethodWebRequest("http://localhost/services/Greeter",
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Server.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Server.java Thu Mar 8 09:14:44 2007
@@ -21,9 +21,9 @@
import javax.xml.ws.Endpoint;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-public class Server extends TestServerBase {
+public class Server extends AbstractBusTestServerBase {
protected void run() {
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java Thu Mar 8 09:14:44 2007
@@ -33,34 +33,29 @@
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.apache.cxf.binding.soap.Soap12;
import org.apache.cxf.helpers.XMLUtils;
import org.apache.cxf.helpers.XPathUtils;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.hello_world_soap12_http.Greeter;
import org.apache.hello_world_soap12_http.PingMeFault;
import org.apache.hello_world_soap12_http.SOAPService;
import org.apache.hello_world_soap12_http.types.FaultDetail;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class Soap12ClientServerTest extends ClientServerTestBase {
+public class Soap12ClientServerTest extends AbstractBusClientServerTestBase {
private final QName serviceName = new QName("http://apache.org/hello_world_soap12_http",
"SOAPService");
private final QName portName = new QName("http://apache.org/hello_world_soap12_http", "SoapPort");
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(Soap12ClientServerTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly", launchServer(Server.class));
- }
- };
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class));
}
+ @Test
public void testBasicConnection() throws Exception {
Greeter greeter = getGreeter();
for (int i = 0; i < 5; i++) {
@@ -70,6 +65,7 @@
}
+ @Test
public void testPingMeFault() throws Exception {
Greeter greeter = getGreeter();
try {
@@ -83,6 +79,7 @@
}
}
+ @Test
public void testGetSayHi() throws Exception {
HttpURLConnection httpConnection =
getHttpConnection("http://localhost:9012/SoapContext/SoapPort/sayHi");
@@ -106,6 +103,7 @@
assertEquals("Bonjour", response);
}
+ @Test
public void testGetPingMe() throws Exception {
HttpURLConnection httpConnection =
getHttpConnection("http://localhost:9012/SoapContext/SoapPort/pingMe");
@@ -146,6 +144,7 @@
assertEquals("2", major);
}
+ @Test
public void testGetMethodNotExist() throws Exception {
HttpURLConnection httpConnection =
getHttpConnection("http://localhost:9012/SoapContext/SoapPort/greetMe");
@@ -188,8 +187,5 @@
return service.getPort(portName, Greeter.class);
}
- public static void main(String[] args) {
- junit.textui.TestRunner.run(Soap12ClientServerTest.class);
- }
}
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java Thu Mar 8 09:14:44 2007
@@ -24,26 +24,22 @@
import javax.xml.ws.Holder;
import javax.xml.ws.soap.SOAPBinding;
-import junit.framework.Test;
-import junit.framework.TestSuite;
import org.apache.cxf.swa.SwAService;
import org.apache.cxf.swa.SwAServiceInterface;
import org.apache.cxf.swa.types.DataStruct;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
-public class ClientServerSwaTest extends ClientServerTestBase {
+public class ClientServerSwaTest extends AbstractBusClientServerTestBase {
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(ClientServerSwaTest.class);
- return new ClientServerSetupBase(suite) {
- public void startServers() throws Exception {
- assertTrue("server did not launch correctly", launchServer(Server.class));
- }
- };
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class));
}
+ @Test
public void testSwa() throws Exception {
SwAService service = new SwAService();
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/Server.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/Server.java Thu Mar 8 09:14:44 2007
@@ -22,9 +22,9 @@
import javax.xml.ws.Endpoint;
import javax.xml.ws.soap.SOAPBinding;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-public class Server extends TestServerBase {
+public class Server extends AbstractBusTestServerBase {
protected void run() {
Object implementor = new SwAServiceImpl();