You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by al...@apache.org on 2017/11/17 17:52:23 UTC
[camel] branch master updated: CAMEL-11869: Upgrade mockito-core to
version 2.11.0 for camel-mongodb
This is an automated email from the ASF dual-hosted git repository.
aldettinger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 12791cf CAMEL-11869: Upgrade mockito-core to version 2.11.0 for camel-mongodb
12791cf is described below
commit 12791cf967d740d1e854a9f90311b7c40861ca9a
Author: aldettinger <al...@gmail.com>
AuthorDate: Fri Nov 17 18:47:06 2017 +0100
CAMEL-11869: Upgrade mockito-core to version 2.11.0 for camel-mongodb
---
components/camel-mongodb/pom.xml | 4 ++--
.../camel/component/mongodb/MongoDbConversionsTest.java | 11 +++++------
.../apache/camel/component/mongodb/MongoDbDynamicityTest.java | 10 +++++-----
3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/components/camel-mongodb/pom.xml b/components/camel-mongodb/pom.xml
index 9f7f11c..b94f3a9 100644
--- a/components/camel-mongodb/pom.xml
+++ b/components/camel-mongodb/pom.xml
@@ -84,8 +84,8 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
+ <artifactId>mockito-core</artifactId>
+ <version>${mockito2-version}</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbConversionsTest.java b/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbConversionsTest.java
index 567b56e..743cc12 100644
--- a/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbConversionsTest.java
+++ b/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbConversionsTest.java
@@ -45,7 +45,7 @@ public class MongoDbConversionsTest extends AbstractMongoDbTest {
m1.put("nestedField", m1Nested);
m1.put("_id", "testInsertMap");
- Object result = template.requestBody("direct:insertMap", m1);
+ template.requestBody("direct:insertMap", m1);
BasicDBObject b = testCollection.find(new BasicDBObject("_id", "testInsertMap")).first();
assertNotNull("No record with 'testInsertMap' _id", b);
@@ -54,7 +54,7 @@ public class MongoDbConversionsTest extends AbstractMongoDbTest {
@Test
public void testInsertPojo() {
assertEquals(0, testCollection.count());
- Object result = template.requestBody("direct:insertPojo", new MyPojoTest());
+ template.requestBody("direct:insertPojo", new MyPojoTest());
DBObject b = testCollection.find(new BasicDBObject("_id", "testInsertPojo")).first();
assertNotNull("No record with 'testInsertPojo' _id", b);
}
@@ -62,8 +62,7 @@ public class MongoDbConversionsTest extends AbstractMongoDbTest {
@Test
public void testInsertJsonString() {
assertEquals(0, testCollection.count());
- Object result = template.requestBody("direct:insertJsonString", "{\"fruits\": [\"apple\", \"banana\", \"papaya\"], \"veggie\": \"broccoli\", \"_id\": \"testInsertJsonString\"}");
- //assertTrue(result instanceof WriteResult);
+ template.requestBody("direct:insertJsonString", "{\"fruits\": [\"apple\", \"banana\", \"papaya\"], \"veggie\": \"broccoli\", \"_id\": \"testInsertJsonString\"}");
DBObject b = testCollection.find(new BasicDBObject("_id", "testInsertJsonString")).first();
assertNotNull("No record with 'testInsertJsonString' _id", b);
}
@@ -71,7 +70,7 @@ public class MongoDbConversionsTest extends AbstractMongoDbTest {
@Test
public void testInsertJsonInputStream() throws Exception {
assertEquals(0, testCollection.count());
- Object result = template.requestBody("direct:insertJsonString",
+ template.requestBody("direct:insertJsonString",
IOConverter.toInputStream("{\"fruits\": [\"apple\", \"banana\"], \"veggie\": \"broccoli\", \"_id\": \"testInsertJsonString\"}\n", null));
DBObject b = testCollection.find(new BasicDBObject("_id", "testInsertJsonString")).first();
assertNotNull("No record with 'testInsertJsonString' _id", b);
@@ -85,7 +84,7 @@ public class MongoDbConversionsTest extends AbstractMongoDbTest {
BSONObject bsonObject = new BasicDBObject();
bsonObject.put("_id", "testInsertBsonString");
- Object result = template.requestBody("direct:insertJsonString", new ByteArrayInputStream(encoder.encode(bsonObject)));
+ template.requestBody("direct:insertJsonString", new ByteArrayInputStream(encoder.encode(bsonObject)));
DBObject b = testCollection.find(new BasicDBObject("_id", "testInsertBsonString")).first();
assertNotNull("No record with 'testInsertBsonString' _id", b);
}
diff --git a/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbDynamicityTest.java b/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbDynamicityTest.java
index 0fcd84b..a3aae8e 100644
--- a/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbDynamicityTest.java
+++ b/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbDynamicityTest.java
@@ -43,13 +43,13 @@ public class MongoDbDynamicityTest extends AbstractMongoDbTest {
Map<String, Object> headers = new HashMap<String, Object>();
headers.put(MongoDbConstants.DATABASE, "otherDB");
headers.put(MongoDbConstants.COLLECTION, "otherCollection");
- Object result = template.requestBodyAndHeaders("direct:noDynamicity", body, headers);
+ template.requestBodyAndHeaders("direct:noDynamicity", body, headers);
DBObject b = testCollection.find(new BasicDBObject("_id", "testInsertDynamicityDisabled")).first();
assertNotNull("No record with 'testInsertDynamicityDisabled' _id", b);
body = "{\"_id\": \"testInsertDynamicityDisabledExplicitly\", \"a\" : \"1\"}";
- result = template.requestBodyAndHeaders("direct:noDynamicityExplicit", body, headers);
+ template.requestBodyAndHeaders("direct:noDynamicityExplicit", body, headers);
b = testCollection.find(new BasicDBObject("_id", "testInsertDynamicityDisabledExplicitly")).first();
assertNotNull("No record with 'testInsertDynamicityDisabledExplicitly' _id", b);
@@ -72,7 +72,7 @@ public class MongoDbDynamicityTest extends AbstractMongoDbTest {
String body = "{\"_id\": \"testInsertDynamicityEnabledDBOnly\", \"a\" : \"1\"}";
Map<String, Object> headers = new HashMap<String, Object>();
headers.put(MongoDbConstants.DATABASE, "otherDB");
- Object result = template.requestBodyAndHeaders("direct:dynamicityEnabled", body, headers);
+ template.requestBodyAndHeaders("direct:dynamicityEnabled", body, headers);
MongoCollection<BasicDBObject> dynamicCollection = mongo.getDatabase("otherDB").getCollection(testCollection.getNamespace().getCollectionName(), BasicDBObject.class);
@@ -100,7 +100,7 @@ public class MongoDbDynamicityTest extends AbstractMongoDbTest {
String body = "{\"_id\": \"testInsertDynamicityEnabledCollectionOnly\", \"a\" : \"1\"}";
Map<String, Object> headers = new HashMap<String, Object>();
headers.put(MongoDbConstants.COLLECTION, "otherCollection");
- Object result = template.requestBodyAndHeaders("direct:dynamicityEnabled", body, headers);
+ template.requestBodyAndHeaders("direct:dynamicityEnabled", body, headers);
MongoCollection<BasicDBObject> dynamicCollection = db.getCollection("otherCollection", BasicDBObject.class);
@@ -128,7 +128,7 @@ public class MongoDbDynamicityTest extends AbstractMongoDbTest {
Map<String, Object> headers = new HashMap<String, Object>();
headers.put(MongoDbConstants.DATABASE, "otherDB");
headers.put(MongoDbConstants.COLLECTION, "otherCollection");
- Object result = template.requestBodyAndHeaders("direct:dynamicityEnabled", body, headers);
+ template.requestBodyAndHeaders("direct:dynamicityEnabled", body, headers);
MongoCollection<BasicDBObject> dynamicCollection = mongo.getDatabase("otherDB").getCollection("otherCollection", BasicDBObject.class);
--
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].