Author: davsclaus
Date: Fri Sep 18 09:34:46 2009
New Revision: 816560
URL: http://svn.apache.org/viewvc?rev=816560&view=rev
Log:
Added unit test for issue with package scan.
Added:
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/MyRouteBuilder.java
(with props)
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/SpringPackageTest.java
(with props)
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml
- copied, changed from r816485,
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringMainStartFailedIssueTest.xml
Added:
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/MyRouteBuilder.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/MyRouteBuilder.java?rev=816560&view=auto
==============================================================================
---
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/MyRouteBuilder.java
(added)
+++
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/MyRouteBuilder.java
Fri Sep 18 09:34:46 2009
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.issues;
+
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ * @version $Revision$
+ */
+public class MyRouteBuilder extends RouteBuilder {
+
+ public void configure() throws Exception {
+ from("direct:start").to("mock:result");
+ }
+
+}
Propchange:
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/MyRouteBuilder.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/MyRouteBuilder.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/SpringPackageTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/SpringPackageTest.java?rev=816560&view=auto
==============================================================================
---
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/SpringPackageTest.java
(added)
+++
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/SpringPackageTest.java
Fri Sep 18 09:34:46 2009
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.issues;
+
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringTestSupport;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @version $Revision$
+ */
+public class SpringPackageTest extends SpringTestSupport {
+
+ protected AbstractXmlApplicationContext createApplicationContext() {
+ return new
ClassPathXmlApplicationContext("org/apache/camel/spring/issues/SpringPackageTest.xml");
+ }
+
+ public void testFoundRoute() throws Exception {
+ MockEndpoint mock = getMockEndpoint("mock:result");
+ mock.expectedMessageCount(1);
+
+ template.sendBody("direct:start", "Hello World");
+
+ mock.assertIsSatisfied();
+ }
+}
Propchange:
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/SpringPackageTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/SpringPackageTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Copied:
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml
(from r816485,
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringMainStartFailedIssueTest.xml)
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml?p2=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml&p1=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringMainStartFailedIssueTest.xml&r1=816485&r2=816560&rev=816560&view=diff
==============================================================================
---
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringMainStartFailedIssueTest.xml
(original)
+++
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml
Fri Sep 18 09:34:46 2009
@@ -23,11 +23,7 @@
">
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="xxx:unknown"/>
- <to uri="mock:foo"/>
- </route>
-
+ <package>org.apache.camel.spring.issues</package>
</camelContext>
</beans>