camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/2] git commit: Added an unit test to verify the bus setting of camel-cxf endpoint.
Date Tue, 05 Nov 2013 08:50:36 GMT
Added an unit test to verify the bus setting of camel-cxf endpoint.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2183730c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2183730c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2183730c

Branch: refs/heads/master
Commit: 2183730cfc276065ead0476efa5dbbc4a7d30ad0
Parents: 3f10f61
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Tue Nov 5 16:50:08 2013 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Tue Nov 5 16:50:08 2013 +0800

----------------------------------------------------------------------
 .../cxf/spring/CxfEndpointBeanBusSettingTest.java        | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2183730c/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanBusSettingTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanBusSettingTest.java
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanBusSettingTest.java
index 95eff8f..bff3527 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanBusSettingTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanBusSettingTest.java
@@ -51,6 +51,17 @@ public class CxfEndpointBeanBusSettingTest extends AbstractSpringBeanTestSupport
         assertEquals(cxf2, endpoint.getBus());
         assertEquals("snarf", endpoint.getBus().getProperty("foo"));
         
+        
+    }
+    
+    @Test
+    public void testBusInjectionOnURI() throws Exception {
+        CamelContext camelContext = (CamelContext) ctx.getBean("camel");
+        CxfEndpoint endpoint = camelContext.getEndpoint("cxf:bean:serviceEndpoint?bus=#cxf1",
CxfEndpoint.class);
+        assertEquals(ctx.getBean("cxf1"), endpoint.getBus());
+        
+        endpoint = camelContext.getEndpoint("cxf:http://localhost:" + port1 + "/CxfEndpointBeanBusSettingTest/router1?bus=#cxf1",
CxfEndpoint.class);
+        assertEquals(ctx.getBean("cxf1"), endpoint.getBus());
     }
     
 


Mime
View raw message