Author: davsclaus
Date: Fri Apr 27 08:13:11 2012
New Revision: 1331288
URL: http://svn.apache.org/viewvc?rev=1331288&view=rev
Log:
CAMEL-5230: Added test
Added:
camel/trunk/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminTest.java
camel/trunk/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin.xml
- copied, changed from r1331237,
camel/trunk/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/filterTest.xml
Modified:
camel/trunk/components/camel-test-blueprint/src/test/resources/log4j.properties
Added:
camel/trunk/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminTest.java?rev=1331288&view=auto
==============================================================================
---
camel/trunk/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminTest.java
(added)
+++
camel/trunk/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminTest.java
Fri Apr 27 08:13:11 2012
@@ -0,0 +1,42 @@
+/**
+ * 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.test.blueprint;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ *
+ */
+@Ignore("pojosr need to support config admin")
+public class ConfigAdminTest extends CamelBlueprintTestSupport {
+
+ @Override
+ protected String getBlueprintDescriptor() {
+ return "org/apache/camel/test/blueprint/configadmin.xml";
+ }
+
+ @Test
+ public void testConfigAdmin() throws Exception {
+ getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
+ template.sendBody("direct:start", "World");
+
+ assertMockEndpointsSatisfied();
+ }
+
+}
Modified:
camel/trunk/components/camel-test-blueprint/src/test/resources/log4j.properties
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-test-blueprint/src/test/resources/log4j.properties?rev=1331288&r1=1331287&r2=1331288&view=diff
==============================================================================
---
camel/trunk/components/camel-test-blueprint/src/test/resources/log4j.properties
(original)
+++
camel/trunk/components/camel-test-blueprint/src/test/resources/log4j.properties
Fri Apr 27 08:13:11 2012
@@ -22,6 +22,7 @@ log4j.rootLogger=INFO, file
#log4j.logger.de.kalpatec.pojosr=DEBUG
#log4j.logger.org.apache.camel.test.blueprint=DEBUG
+#log4j.logger.org.apache.camel=DEBUG
# CONSOLE appender not used by default
log4j.appender.out=org.apache.log4j.ConsoleAppender
Copied:
camel/trunk/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin.xml
(from r1331237,
camel/trunk/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/filterTest.xml)
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin.xml?p2=camel/trunk/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin.xml&p1=camel/trunk/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/filterTest.xml&r1=1331237&r2=1331288&rev=1331288&view=diff
==============================================================================
---
camel/trunk/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/filterTest.xml
(original)
+++
camel/trunk/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin.xml
Fri Apr 27 08:13:11 2012
@@ -15,23 +15,31 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<!-- START SNIPPET: example -->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xsi:schemaLocation="
+ http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0
http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
- <camelContext id="filterCamel"
xmlns="http://camel.apache.org/schema/blueprint">
+ <!-- blueprint property placeholders -->
+ <cm:property-placeholder persistent-id="my-placeholders">
+ <cm:default-properties>
+ <cm:property name="greeting" value="Hello"/>
+ <cm:property name="destination" value="mock:result"/>
+ </cm:default-properties>
+ </cm:property-placeholder>
+
+ <camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="direct:start"/>
- <filter>
- <simple>${header.foo} == 'bar'</simple>
- <to uri="mock:result"/>
- </filter>
+ <transform>
+ <simple>{{greeting}} ${body}</simple>
+ </transform>
+ <to uri="{{destination}}"/>
</route>
</camelContext>
</blueprint>
-<!-- END SNIPPET: example -->