camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [14/17] camel git commit: CAMEL-10721: camel-connector example
Date Thu, 19 Jan 2017 11:06:54 GMT
CAMEL-10721: camel-connector example


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

Branch: refs/heads/master
Commit: 6333ffc26892aefe84adb8e74f29bb3e58f43057
Parents: 219df16
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Jan 18 17:04:28 2017 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Jan 19 11:00:00 2017 +0100

----------------------------------------------------------------------
 connectors/camel-connector-maven-plugin/pom.xml |  2 +-
 connectors/camel-connector/pom.xml              |  2 +-
 .../src/test/java/io/fabric/FooBarTest.java     | 48 ---------------
 .../src/test/java/org/foo/FooBarWineTest.java   | 61 ++++++++++++++++++++
 4 files changed, 63 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6333ffc2/connectors/camel-connector-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/connectors/camel-connector-maven-plugin/pom.xml b/connectors/camel-connector-maven-plugin/pom.xml
index 6eaaf29..524b1be 100644
--- a/connectors/camel-connector-maven-plugin/pom.xml
+++ b/connectors/camel-connector-maven-plugin/pom.xml
@@ -26,7 +26,7 @@
   </parent>
 
   <artifactId>camel-connector-maven-plugin</artifactId>
-  <name>Camel :: Connector :: Camel Connector Maven Plugin</name>
+  <name>Camel :: Connectors :: Camel Connector Maven Plugin</name>
   <packaging>maven-plugin</packaging>
 
   <dependencies>

http://git-wip-us.apache.org/repos/asf/camel/blob/6333ffc2/connectors/camel-connector/pom.xml
----------------------------------------------------------------------
diff --git a/connectors/camel-connector/pom.xml b/connectors/camel-connector/pom.xml
index 8706635..d1f6a34 100644
--- a/connectors/camel-connector/pom.xml
+++ b/connectors/camel-connector/pom.xml
@@ -27,7 +27,7 @@
 
   <artifactId>camel-connector</artifactId>
   <packaging>jar</packaging>
-  <name>Camel :: Connector Component</name>
+  <name>Camel :: Connectors :: Connector Component</name>
   <description>Camel Connector Component</description>
 
   <properties>

http://git-wip-us.apache.org/repos/asf/camel/blob/6333ffc2/connectors/examples/foo-bar-wine-example/src/test/java/io/fabric/FooBarTest.java
----------------------------------------------------------------------
diff --git a/connectors/examples/foo-bar-wine-example/src/test/java/io/fabric/FooBarTest.java
b/connectors/examples/foo-bar-wine-example/src/test/java/io/fabric/FooBarTest.java
deleted file mode 100644
index 84e47fd..0000000
--- a/connectors/examples/foo-bar-wine-example/src/test/java/io/fabric/FooBarTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Copyright 2005-2015 Red Hat, Inc.
- * <p>
- * Red Hat 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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 io.fabric;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
-
-public class FooBarTest extends CamelTestSupport {
-
-    @Test
-    public void testFooBar() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-
-        mock.expectedMinimumMessageCount(2);
-        mock.setAssertPeriod(500);
-    	
-        assertMockEndpointsSatisfied();
-    }
-
-    
-    @Override
-    protected RoutesBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from("foo:hello?period=100")
-                    .to("bar:beer")
-                    .to("mock:result");
-            }
-        };
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/6333ffc2/connectors/examples/foo-bar-wine-example/src/test/java/org/foo/FooBarWineTest.java
----------------------------------------------------------------------
diff --git a/connectors/examples/foo-bar-wine-example/src/test/java/org/foo/FooBarWineTest.java
b/connectors/examples/foo-bar-wine-example/src/test/java/org/foo/FooBarWineTest.java
new file mode 100644
index 0000000..92e1c10
--- /dev/null
+++ b/connectors/examples/foo-bar-wine-example/src/test/java/org/foo/FooBarWineTest.java
@@ -0,0 +1,61 @@
+/**
+ * Copyright 2005-2015 Red Hat, Inc.
+ * <p>
+ * Red Hat 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.foo;
+
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class FooBarWineTest extends CamelTestSupport {
+
+    @Test
+    public void testFooBar() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:bar");
+
+        mock.expectedMinimumMessageCount(2);
+        mock.setAssertPeriod(500);
+    	
+        assertMockEndpointsSatisfied();
+    }
+
+    @Test
+    public void testFooWine() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:wine");
+
+        mock.expectedMinimumMessageCount(2);
+        mock.setAssertPeriod(500);
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected RoutesBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("foo:hello?period=100")
+                    .to("bar:Beer?amount=5")
+                    .to("mock:bar");
+
+                from("foo:hello2?period=50")
+                    .to("wine:wine?amount=2")
+                    .to("mock:wine");
+            }
+        };
+    }
+}


Mime
View raw message