You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2015/06/19 17:08:43 UTC

camel git commit: Camel-Hazelcast: Align Spring Multimap and ReplicatedMap producer tests testing all the available operations

Repository: camel
Updated Branches:
  refs/heads/master fb1ee61f7 -> fac97da87


Camel-Hazelcast: Align Spring Multimap and ReplicatedMap producer tests testing all the available operations


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

Branch: refs/heads/master
Commit: fac97da875c8598f6ec91448215df7d98ff7bf41
Parents: fb1ee61
Author: Andrea Cosentino <an...@gmail.com>
Authored: Fri Jun 19 17:06:33 2015 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Fri Jun 19 17:06:33 2015 +0200

----------------------------------------------------------------------
 .../hazelcast/HazelcastMultimapProducerForSpringTest.java    | 6 ++++++
 .../HazelcastReplicatedmapProducerForSpringTest.java         | 6 ++++++
 .../META-INF/spring/test-camel-context-multimap.xml          | 8 ++++++++
 .../META-INF/spring/test-camel-context-replicatedmap.xml     | 8 ++++++++
 4 files changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fac97da8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapProducerForSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapProducerForSpringTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapProducerForSpringTest.java
index f6ef368..fad42fe 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapProducerForSpringTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapProducerForSpringTest.java
@@ -84,6 +84,12 @@ public class HazelcastMultimapProducerForSpringTest extends HazelcastCamelSpring
         template.sendBodyAndHeader("direct:delete", null, HazelcastConstants.OBJECT_ID, 4711);
         verify(map).remove(4711);
     }
+    
+    @Test
+    public void testValueCount() {
+        template.sendBodyAndHeader("direct:valueCount", "test", HazelcastConstants.OBJECT_ID, "4711");
+        verify(map).valueCount("4711");
+    }
 
     @Test
     public void testContainsKey() {

http://git-wip-us.apache.org/repos/asf/camel/blob/fac97da8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReplicatedmapProducerForSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReplicatedmapProducerForSpringTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReplicatedmapProducerForSpringTest.java
index 2382bdd..3922c0c 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReplicatedmapProducerForSpringTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReplicatedmapProducerForSpringTest.java
@@ -79,6 +79,12 @@ public class HazelcastReplicatedmapProducerForSpringTest extends HazelcastCamelS
         template.sendBodyAndHeader("direct:delete", null, HazelcastConstants.OBJECT_ID, 4711);
         verify(map).remove(4711);
     }
+        
+    @Test
+    public void testClear() {
+        template.sendBody("direct:clear", "test");
+        verify(map).clear();
+    }
 
     @Test
     public void testContainsKey() {

http://git-wip-us.apache.org/repos/asf/camel/blob/fac97da8/components/camel-hazelcast/src/test/resources/META-INF/spring/test-camel-context-multimap.xml
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/resources/META-INF/spring/test-camel-context-multimap.xml b/components/camel-hazelcast/src/test/resources/META-INF/spring/test-camel-context-multimap.xml
index 1c2fa65..19fd9a8 100644
--- a/components/camel-hazelcast/src/test/resources/META-INF/spring/test-camel-context-multimap.xml
+++ b/components/camel-hazelcast/src/test/resources/META-INF/spring/test-camel-context-multimap.xml
@@ -57,6 +57,14 @@
 		</route>
 		
 		<route>
+			<from uri="direct:valueCount" />
+			<setHeader headerName="CamelHazelcastOperationType">
+				<constant>valueCount</constant>
+			</setHeader>
+			<to uri="hazelcast:multimap:bar" />
+		</route>
+		
+		<route>
 			<from uri="direct:containsKey" />
 			<setHeader headerName="CamelHazelcastOperationType">
 				<constant>containsKey</constant>

http://git-wip-us.apache.org/repos/asf/camel/blob/fac97da8/components/camel-hazelcast/src/test/resources/META-INF/spring/test-camel-context-replicatedmap.xml
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/resources/META-INF/spring/test-camel-context-replicatedmap.xml b/components/camel-hazelcast/src/test/resources/META-INF/spring/test-camel-context-replicatedmap.xml
index a7f3bc9..9f73e36 100644
--- a/components/camel-hazelcast/src/test/resources/META-INF/spring/test-camel-context-replicatedmap.xml
+++ b/components/camel-hazelcast/src/test/resources/META-INF/spring/test-camel-context-replicatedmap.xml
@@ -49,6 +49,14 @@
 		</route>
 		
 		<route>
+			<from uri="direct:clear" />
+			<setHeader headerName="CamelHazelcastOperationType">
+				<constant>clear</constant>
+			</setHeader>
+			<to uri="hazelcast:replicatedmap:bar" />
+		</route>
+		
+		<route>
 			<from uri="direct:containsKey" />
 			<setHeader headerName="CamelHazelcastOperationType">
 				<constant>containsKey</constant>