activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r533686 - in /activemq/camel/trunk/camel-spring/src/test: java/org/apache/camel/spring/CamelContextFactoryBeanTest.java resources/org/apache/camel/spring/camel_context_factory_bean_test.xml
Date Mon, 30 Apr 2007 10:43:45 GMT
Author: jstrachan
Date: Mon Apr 30 03:43:44 2007
New Revision: 533686

URL: http://svn.apache.org/viewvc?view=rev&rev=533686
Log:
added a test case for the spring 2.0 namespace configuration of the packages

Modified:
    activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java
    activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/camel_context_factory_bean_test.xml

Modified: activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java?view=diff&rev=533686&r1=533685&r2=533686
==============================================================================
--- activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java
(original)
+++ activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java
Mon Apr 30 03:43:44 2007
@@ -41,6 +41,17 @@
         ApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/camel_context_factory_bean_test.xml");
 
         CamelContext context = (CamelContext) applicationContext.getBean("camel");
+        assertValidContext(context);
+    }
+
+    public void testClassPathRouteLoadingUsingNamespaces() throws Exception {
+        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/camel_context_factory_bean_test.xml");
+
+        CamelContext context = (CamelContext) applicationContext.getBean("camel3");
+        assertValidContext(context);
+    }
+
+    protected void assertValidContext(CamelContext context) {
         assertNotNull("No context found!", context);
 
         List<Route> routes = context.getRoutes();
@@ -55,7 +66,7 @@
             assertEndpointUri(key, "queue:test.a");
         }
     }
-    
+
     public void testXMLRouteLoading() throws Exception {
         ApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/camel_context_factory_bean_test.xml");
 

Modified: activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/camel_context_factory_bean_test.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/camel_context_factory_bean_test.xml?view=diff&rev=533686&r1=533685&r2=533686
==============================================================================
--- activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/camel_context_factory_bean_test.xml
(original)
+++ activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/camel_context_factory_bean_test.xml
Mon Apr 30 03:43:44 2007
@@ -41,4 +41,8 @@
   </bean>
   <!-- END SNIPPET: example2 -->
   
+  <!-- START SNIPPET: example3 -->
+  <camelContext id="camel3" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd"
packages="org.apache.camel.spring.example"/>
+  <!-- END SNIPPET: example3 -->
+
 </beans>



Mime
View raw message