Updated Branches:
  refs/heads/camel-2.12.x 97ed1bcb0 -> 08e7f8178
  refs/heads/master 13a3daa6f -> 6f729ece0


Added unit test based on user forum issue


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

Branch: refs/heads/master
Commit: e3d3d08ab6b7088923e642ce1d6627f01e66032a
Parents: 13a3daa
Author: Claus Ibsen <davscl...@apache.org>
Authored: Sat Sep 28 08:53:59 2013 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Sat Sep 28 08:54:11 2013 +0200

----------------------------------------------------------------------
 .../test/blueprint/ConfigAdminEndpointTest.java | 40 ++++++++++++++++
 .../test/blueprint/configadmin-endpoint.xml     | 48 ++++++++++++++++++++
 2 files changed, 88 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e3d3d08a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
 
b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
new file mode 100644
index 0000000..733ebd8
--- /dev/null
+++ 
b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
@@ -0,0 +1,40 @@
+/**
+ * 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.Test;
+
+/**
+ *
+ */
+public class ConfigAdminEndpointTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-endpoint.xml";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/e3d3d08a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml
----------------------------------------------------------------------
diff --git 
a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml
 
b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml
new file mode 100644
index 0000000..c203639
--- /dev/null
+++ 
b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<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";>
+
+  <!-- blueprint property placeholders -->
+  <cm:property-placeholder persistent-id="my-placeholders">
+    <cm:default-properties>
+      <cm:property name="greeting" value="Bye"/>
+      <cm:property name="destination" value="mock:result"/>
+    </cm:default-properties>
+  </cm:property-placeholder>
+
+  <camelContext id="myCamel" xmlns="http://camel.apache.org/schema/blueprint";>
+
+    <!-- need to use {{ }} with blueprint -->
+    <endpoint id="foo" uri="{{destination}}"/>
+
+    <route>
+      <from uri="direct:start"/>
+      <transform>
+        <simple>{{greeting}} ${body}</simple>
+      </transform>
+      <to uri="ref:foo"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>

Reply via email to