camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hekon...@apache.org
Subject [1/2] camel git commit: MongoDB tests refactoring.
Date Mon, 10 Nov 2014 17:01:36 GMT
Repository: camel
Updated Branches:
  refs/heads/master 92b709887 -> 7fb5c5843


MongoDB tests refactoring.


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

Branch: refs/heads/master
Commit: 8016d5530e15381b9895015ef1f1d6ce1d458ff9
Parents: 92b7098
Author: Henryk Konsek <hekonsek@gmail.com>
Authored: Mon Nov 10 17:54:43 2014 +0100
Committer: Henryk Konsek <hekonsek@gmail.com>
Committed: Mon Nov 10 17:54:43 2014 +0100

----------------------------------------------------------------------
 .../camel/component/mongodb/MongoDbOperationsTest.java  |  6 +++---
 .../component/mongodb/mongoBasicOperationsTest.xml      | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8016d553/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbOperationsTest.java
----------------------------------------------------------------------
diff --git a/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbOperationsTest.java
b/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbOperationsTest.java
index 0817754..2b15855 100644
--- a/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbOperationsTest.java
+++ b/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbOperationsTest.java
@@ -67,7 +67,7 @@ public class MongoDbOperationsTest extends AbstractMongoDbTest {
     @Test
     public void testStoreOid() throws Exception {
         DBObject dbObject = new BasicDBObject();
-        ObjectId oid = template.requestBody("direct:testStoreOid", dbObject, ObjectId.class);
+        ObjectId oid = template.requestBody("direct:testStoreOidOnInsert", dbObject, ObjectId.class);
         assertEquals(dbObject.get("_id"), oid);
     }
 
@@ -75,7 +75,7 @@ public class MongoDbOperationsTest extends AbstractMongoDbTest {
     public void testStoreOids() throws Exception {
         DBObject firstDbObject = new BasicDBObject();
         DBObject secondDbObject = new BasicDBObject();
-        List<ObjectId> oids = template.requestBody("direct:testStoreOid", asList(firstDbObject,
secondDbObject), List.class);
+        List<ObjectId> oids = template.requestBody("direct:testStoreOidOnInsert", asList(firstDbObject,
secondDbObject), List.class);
         assertTrue(oids.contains(firstDbObject.get("_id")));
         assertTrue(oids.contains(secondDbObject.get("_id")));
     }
@@ -232,7 +232,7 @@ public class MongoDbOperationsTest extends AbstractMongoDbTest {
                 
                 from("direct:count").to("mongodb:myDb?database={{mongodb.testDb}}&collection={{mongodb.testCollection}}&operation=count&dynamicity=true");
                 from("direct:insert").to("mongodb:myDb?database={{mongodb.testDb}}&collection={{mongodb.testCollection}}&operation=insert&writeConcern=SAFE");
-                from("direct:testStoreOid").to("mongodb:myDb?database={{mongodb.testDb}}&collection={{mongodb.testCollection}}&operation=insert&writeConcern=SAFE").
+                from("direct:testStoreOidOnInsert").to("mongodb:myDb?database={{mongodb.testDb}}&collection={{mongodb.testCollection}}&operation=insert&writeConcern=SAFE").
                     setBody().header(MongoDbConstants.OID);
                 from("direct:save").to("mongodb:myDb?database={{mongodb.testDb}}&collection={{mongodb.testCollection}}&operation=save&writeConcern=SAFE");
                 from("direct:update").to("mongodb:myDb?database={{mongodb.testDb}}&collection={{mongodb.testCollection}}&operation=update&writeConcern=SAFE");

http://git-wip-us.apache.org/repos/asf/camel/blob/8016d553/components/camel-mongodb/src/test/resources/org/apache/camel/component/mongodb/mongoBasicOperationsTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-mongodb/src/test/resources/org/apache/camel/component/mongodb/mongoBasicOperationsTest.xml
b/components/camel-mongodb/src/test/resources/org/apache/camel/component/mongodb/mongoBasicOperationsTest.xml
index e233dd9..ed39871 100644
--- a/components/camel-mongodb/src/test/resources/org/apache/camel/component/mongodb/mongoBasicOperationsTest.xml
+++ b/components/camel-mongodb/src/test/resources/org/apache/camel/component/mongodb/mongoBasicOperationsTest.xml
@@ -37,12 +37,7 @@
     </route>
     
     <route>
-        <from uri="direct:save" />
-        <to uri="mongodb:myDb?database={{mongodb.testDb}}&amp;collection={{mongodb.testCollection}}&amp;operation=save&amp;writeConcern=SAFE"
/>
-    </route>
-
-    <route>
-        <from uri="direct:testStoreOid" />
+        <from uri="direct:testStoreOidOnInsert" />
         <to uri="mongodb:myDb?database={{mongodb.testDb}}&amp;collection={{mongodb.testCollection}}&amp;operation=insert&amp;writeConcern=SAFE"
/>
         <setBody>
           <header>CamelMongoOid</header>
@@ -50,6 +45,11 @@
     </route>
 
     <route>
+        <from uri="direct:save" />
+        <to uri="mongodb:myDb?database={{mongodb.testDb}}&amp;collection={{mongodb.testCollection}}&amp;operation=save&amp;writeConcern=SAFE"
/>
+    </route>
+
+    <route>
         <from uri="direct:update" />
         <to uri="mongodb:myDb?database={{mongodb.testDb}}&amp;collection={{mongodb.testCollection}}&amp;operation=update&amp;writeConcern=SAFE"
/>
     </route>


Mime
View raw message