camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r713288 - in /activemq/camel/branches/camel-1.x: ./ components/camel-cxf/src/test/java/org/apache/camel/component/cxf/
Date Wed, 12 Nov 2008 07:28:49 GMT
Author: ningjiang
Date: Tue Nov 11 23:28:48 2008
New Revision: 713288

URL: http://svn.apache.org/viewvc?rev=713288&view=rev
Log:
Merged revisions 713273 via svnmerge from 
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r713273 | ningjiang | 2008-11-12 14:42:32 +0800 (Wed, 12 Nov 2008) | 1 line
  
  Clean up the CXF Greeter unit tests
........

Added:
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRouterTestSupport.java
      - copied unchanged from r713273, activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRouterTestSupport.java
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSimpleRouterTest.java
      - copied unchanged from r713273, activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSimpleRouterTest.java
Removed:
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRouterTest.java
Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterMessageRouterTest.java
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadRouterTest.java
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadMessageRouterTest.java
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov 11 23:28:48 2008
@@ -1 +1 @@
-/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107
+/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713273

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Nov 11 23:28:48 2008
@@ -1 +1 @@
-/activemq/camel/trunk:1-708421,708553-709447,709449-709612,709614-709634,709636-710013,711200,711206,711219-711220,711523,711531,711599,711655-711656,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712712,712925,713013,713107
+/activemq/camel/trunk:1-708421,708553-709447,709449-709612,709614-709634,709636-710013,711200,711206,711219-711220,711523,711531,711599,711655-711656,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712712,712925,713013,713107,713273

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java
Tue Nov 11 23:28:48 2008
@@ -22,25 +22,50 @@
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.Service;
 
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
 import org.apache.camel.CamelContext;
+import org.apache.camel.spring.SpringCamelContext;
 import org.apache.camel.spring.processor.SpringTestHelper;
+import org.apache.cxf.jaxws.EndpointImpl;
 import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.GreeterImpl;
 import org.apache.hello_world_soap_http.NoSuchCodeLitFault;
 
-public class CXFGreeterRouterTest extends CxfSpringRouterTest {
+public class CXFGreeterRouterTest extends CxfRouterTestSupport {
+    protected AbstractXmlApplicationContext applicationContext;
+    
     private final QName serviceName = new QName("http://apache.org/hello_world_soap_http",
                                                 "SOAPService");
     private final QName routerPortName = new QName("http://apache.org/hello_world_soap_http",
                                                 "RouterPort");
+
+    @Override
+    protected void setUp() throws Exception {
+        applicationContext = createApplicationContext();
+        super.setUp();
+        assertNotNull("Should have created a valid spring context", applicationContext);
+
+
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        if (applicationContext != null) {
+            applicationContext.destroy();
+        }
+        super.tearDown();
+    }
     @Override
     protected void startService() {
         Object implementor = new GreeterImpl();
         String address = "http://localhost:9000/SoapContext/SoapPort";
-        Endpoint.publish(address, implementor);
+        EndpointImpl endpoint = (EndpointImpl)Endpoint.publish(address, implementor);
+        server = endpoint.getServer();
     }
 
-    @Override
+    
     public void testInvokingServiceFromCXFClient() throws Exception {
         Service service = Service.create(serviceName);
         service.addPort(routerPortName, "http://schemas.xmlsoap.org/soap/",
@@ -67,20 +92,17 @@
         }
 
     }
-
+    
     @Override
-    public void testOnwayInvocation() throws Exception {
-        Service service = Service.create(serviceName);
-        service.addPort(routerPortName, "http://schemas.xmlsoap.org/soap/",
-                        "http://localhost:9003/CamelContext/RouterPort");
-        Greeter greeter = service.getPort(routerPortName, Greeter.class);
-        greeter.greetMeOneWay("call greetMe OneWay !");
+    protected CamelContext createCamelContext() throws Exception {
+        return SpringCamelContext.springCamelContext(applicationContext);
     }
 
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        return SpringTestHelper.createSpringCamelContext(this, "org/apache/camel/component/cxf/GreeterEndpointsRouterContext.xml");
+
+    protected ClassPathXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GreeterEndpointsRouterContext.xml");
     }
+   
 }
 
 

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterMessageRouterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterMessageRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterMessageRouterTest.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterMessageRouterTest.java
Tue Nov 11 23:28:48 2008
@@ -34,12 +34,7 @@
             }
         };
     }
-
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        return SpringCamelContext.springCamelContext(applicationContext);
-    }
-
+    
     @Override
     protected ClassPathXmlApplicationContext createApplicationContext() {
         return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GreeterEndpointBeans.xml");

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadRouterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadRouterTest.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadRouterTest.java
Tue Nov 11 23:28:48 2008
@@ -35,11 +35,7 @@
         };
     }
 
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        return SpringCamelContext.springCamelContext(applicationContext);
-    }
-
+    
     @Override
     protected ClassPathXmlApplicationContext createApplicationContext() {
         return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GreeterEndpointBeans.xml");

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadMessageRouterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadMessageRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadMessageRouterTest.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadMessageRouterTest.java
Tue Nov 11 23:28:48 2008
@@ -18,7 +18,7 @@
 
 import org.apache.camel.builder.RouteBuilder;
 
-public class CxfPayLoadMessageRouterTest extends CxfRouterTest {
+public class CxfPayLoadMessageRouterTest extends CxfSimpleRouterTest {
     private String routerEndpointURI = "cxf://" + ROUTER_ADDRESS + "?" + SERVICE_CLASS +
"&dataFormat=PAYLOAD";
     private String serviceEndpointURI = "cxf://" + SERVICE_ADDRESS + "?" + SERVICE_CLASS
+ "&dataFormat=PAYLOAD";
     protected RouteBuilder createRouteBuilder() {

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java
Tue Nov 11 23:28:48 2008
@@ -18,7 +18,7 @@
 
 import org.apache.camel.builder.RouteBuilder;
 
-public class CxfRawMessageRouterTest extends CxfRouterTest {
+public class CxfRawMessageRouterTest extends CxfSimpleRouterTest {
     private String routerEndpointURI = "cxf://" + ROUTER_ADDRESS + "?" + SERVICE_CLASS +
"&dataFormat=MESSAGE";
     private String serviceEndpointURI = "cxf://" + SERVICE_ADDRESS + "?" + SERVICE_CLASS
+ "&dataFormat=MESSAGE";
     protected RouteBuilder createRouteBuilder() {

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java
Tue Nov 11 23:28:48 2008
@@ -23,7 +23,7 @@
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public class CxfSpringRouterTest extends CxfRouterTest {
+public class CxfSpringRouterTest extends CxfSimpleRouterTest {
     protected AbstractXmlApplicationContext applicationContext;
 
     @Override



Mime
View raw message