You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/10/03 07:57:31 UTC
camel git commit: CAMEL-11869: Adopted mockito-core 2.10.0 except for
camel-core
Repository: camel
Updated Branches:
refs/heads/master 23d5d22f9 -> d4d5ad376
CAMEL-11869: Adopted mockito-core 2.10.0 except for camel-core
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d4d5ad37
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d4d5ad37
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d4d5ad37
Branch: refs/heads/master
Commit: d4d5ad3764aca3a28409cab2380d1dd88da45a18
Parents: 23d5d22
Author: aldettinger <al...@gmail.com>
Authored: Sun Oct 1 14:09:26 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Oct 3 09:57:22 2017 +0200
----------------------------------------------------------------------
camel-core/pom.xml | 1 +
components/camel-caffeine/pom.xml | 12 ------------
components/camel-chronicle/pom.xml | 12 ------------
components/camel-consul/pom.xml | 12 ------------
.../xml/AbstractCamelContextFactoryBeanTest.java | 2 +-
components/camel-digitalocean/pom.xml | 5 -----
components/camel-ehcache/pom.xml | 12 ------------
components/camel-gora/pom.xml | 3 +--
components/camel-infinispan/pom.xml | 6 ------
components/camel-irc/pom.xml | 3 +--
components/camel-jcache/pom.xml | 6 ------
.../camel/component/metrics/GaugeProducerTest.java | 12 ++++++------
.../camel/component/metrics/GaugeRouteTest.java | 16 ++++++++--------
components/camel-mongodb/pom.xml | 3 +--
components/camel-printer/pom.xml | 3 +--
components/camel-reactive-streams/pom.xml | 8 +-------
components/camel-reactor/pom.xml | 6 ------
.../camel-servicenow-component/pom.xml | 12 ------------
components/camel-spark-rest/pom.xml | 3 +--
components/camel-telegram/pom.xml | 3 +--
parent/pom.xml | 2 +-
21 files changed, 24 insertions(+), 118 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/camel-core/pom.xml
----------------------------------------------------------------------
diff --git a/camel-core/pom.xml b/camel-core/pom.xml
index 4138db0..eea6780 100644
--- a/camel-core/pom.xml
+++ b/camel-core/pom.xml
@@ -193,6 +193,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
+ <version>1.10.19</version>
<scope>test</scope>
</dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-caffeine/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-caffeine/pom.xml b/components/camel-caffeine/pom.xml
index d8a133e..d0a9f6d 100644
--- a/components/camel-caffeine/pom.xml
+++ b/components/camel-caffeine/pom.xml
@@ -79,18 +79,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>java-hamcrest</artifactId>
- <version>${hamcrest-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>${metrics-version}</version>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-chronicle/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-chronicle/pom.xml b/components/camel-chronicle/pom.xml
index 2f97815..dd6888e 100644
--- a/components/camel-chronicle/pom.xml
+++ b/components/camel-chronicle/pom.xml
@@ -76,18 +76,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>java-hamcrest</artifactId>
- <version>${hamcrest-version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<profiles>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-consul/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-consul/pom.xml b/components/camel-consul/pom.xml
index cbe3a26..d2cfac0 100644
--- a/components/camel-consul/pom.xml
+++ b/components/camel-consul/pom.xml
@@ -94,18 +94,6 @@
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>java-hamcrest</artifactId>
- <version>${hamcrest-version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
----------------------------------------------------------------------
diff --git a/components/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java b/components/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
index bcccfca..e2c59c9 100644
--- a/components/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
+++ b/components/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
@@ -83,7 +83,7 @@ public class AbstractCamelContextFactoryBeanTest {
// program the property resolution in context mock
when(context.resolvePropertyPlaceholders(anyString())).thenAnswer(invocation -> {
- final String placeholder = invocation.getArgumentAt(0, String.class);
+ final String placeholder = invocation.getArgument(0);
// we receive the argument and check if the method should return a
// value that can be converted to boolean
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-digitalocean/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/pom.xml b/components/camel-digitalocean/pom.xml
index f8005fb..20f469d 100644
--- a/components/camel-digitalocean/pom.xml
+++ b/components/camel-digitalocean/pom.xml
@@ -75,11 +75,6 @@
<artifactId>camel-test</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
- </dependency>
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-ehcache/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-ehcache/pom.xml b/components/camel-ehcache/pom.xml
index ec50976..459428b 100644
--- a/components/camel-ehcache/pom.xml
+++ b/components/camel-ehcache/pom.xml
@@ -78,18 +78,6 @@
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>java-hamcrest</artifactId>
- <version>${hamcrest-version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-gora/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-gora/pom.xml b/components/camel-gora/pom.xml
index 0ba69df..52e71f0 100644
--- a/components/camel-gora/pom.xml
+++ b/components/camel-gora/pom.xml
@@ -72,8 +72,7 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
+ <artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-infinispan/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-infinispan/pom.xml b/components/camel-infinispan/pom.xml
index cd243a4..9bcf4a4 100644
--- a/components/camel-infinispan/pom.xml
+++ b/components/camel-infinispan/pom.xml
@@ -151,12 +151,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<!-- unit testing requires java 8 -->
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-irc/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-irc/pom.xml b/components/camel-irc/pom.xml
index 9a27b47..90127ba 100644
--- a/components/camel-irc/pom.xml
+++ b/components/camel-irc/pom.xml
@@ -74,8 +74,7 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
+ <artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-jcache/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-jcache/pom.xml b/components/camel-jcache/pom.xml
index c2cb706..e7eeb21 100644
--- a/components/camel-jcache/pom.xml
+++ b/components/camel-jcache/pom.xml
@@ -96,12 +96,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${hamcrest-version}</version>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeProducerTest.java b/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeProducerTest.java
index 6fd3b92..123747b 100644
--- a/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeProducerTest.java
+++ b/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeProducerTest.java
@@ -76,8 +76,8 @@ public class GaugeProducerTest {
public void testDefault() throws Exception {
verify(registry, times(1)).register(eq(METRICS_NAME), argThat(new ArgumentMatcher<CamelMetricsGauge>() {
@Override
- public boolean matches(Object argument) {
- return argument instanceof CamelMetricsGauge && VALUE.equals(((CamelMetricsGauge)argument).getValue());
+ public boolean matches(CamelMetricsGauge argument) {
+ return VALUE.equals(argument.getValue());
}
}));
}
@@ -89,14 +89,14 @@ public class GaugeProducerTest {
verify(in, times(1)).getHeader(HEADER_GAUGE_SUBJECT, Object.class);
verify(registry, times(1)).register(eq(METRICS_NAME), argThat(new ArgumentMatcher<CamelMetricsGauge>() {
@Override
- public boolean matches(Object argument) {
- return argument instanceof CamelMetricsGauge && VALUE.equals(((CamelMetricsGauge)argument).getValue());
+ public boolean matches(CamelMetricsGauge argument) {
+ return VALUE.equals(argument.getValue());
}
}));
verify(registry, times(1)).register(eq(METRICS_NAME_HEADER), argThat(new ArgumentMatcher<CamelMetricsGauge>() {
@Override
- public boolean matches(Object argument) {
- return argument instanceof CamelMetricsGauge && VALUE_HEADER.equals(((CamelMetricsGauge)argument).getValue());
+ public boolean matches(CamelMetricsGauge argument) {
+ return VALUE_HEADER.equals(argument.getValue());
}
}));
}
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeRouteTest.java
----------------------------------------------------------------------
diff --git a/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeRouteTest.java b/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeRouteTest.java
index 4a03ebf..79d9380 100644
--- a/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeRouteTest.java
+++ b/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeRouteTest.java
@@ -105,8 +105,8 @@ public class GaugeRouteTest {
new Answer<CamelMetricsGauge>() {
@Override
public CamelMetricsGauge answer(InvocationOnMock invocation) throws Throwable {
- mockGauges.put(invocation.getArgumentAt(0, String.class), invocation.getArgumentAt(1, CamelMetricsGauge.class));
- return invocation.getArgumentAt(1, CamelMetricsGauge.class);
+ mockGauges.put(invocation.getArgument(0), invocation.getArgument(1));
+ return invocation.getArgument(1);
}
});
return registry;
@@ -137,8 +137,8 @@ public class GaugeRouteTest {
endpoint.assertIsSatisfied();
verify(mockRegistry, times(1)).register(eq("A"), argThat(new ArgumentMatcher<CamelMetricsGauge>() {
@Override
- public boolean matches(Object argument) {
- return argument instanceof CamelMetricsGauge && "my subject".equals(((CamelMetricsGauge)argument).getValue());
+ public boolean matches(CamelMetricsGauge argument) {
+ return "my subject".equals(argument.getValue());
}
}));
}
@@ -147,8 +147,8 @@ public class GaugeRouteTest {
public void testOverride() throws Exception {
verify(mockRegistry, times(1)).register(eq("A"), argThat(new ArgumentMatcher<CamelMetricsGauge>() {
@Override
- public boolean matches(Object argument) {
- return argument instanceof CamelMetricsGauge && "my subject".equals(((CamelMetricsGauge)argument).getValue());
+ public boolean matches(CamelMetricsGauge argument) {
+ return "my subject".equals(argument.getValue());
}
}));
endpoint.expectedMessageCount(1);
@@ -156,8 +156,8 @@ public class GaugeRouteTest {
endpoint.assertIsSatisfied();
verify(mockRegistry, times(1)).register(eq("B"), argThat(new ArgumentMatcher<CamelMetricsGauge>() {
@Override
- public boolean matches(Object argument) {
- return argument instanceof CamelMetricsGauge && "my overriding subject".equals(((CamelMetricsGauge)argument).getValue());
+ public boolean matches(CamelMetricsGauge argument) {
+ return "my overriding subject".equals(argument.getValue());
}
}));
}
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-mongodb/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-mongodb/pom.xml b/components/camel-mongodb/pom.xml
index ac4a728..ba156fa 100644
--- a/components/camel-mongodb/pom.xml
+++ b/components/camel-mongodb/pom.xml
@@ -84,8 +84,7 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
+ <artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-printer/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-printer/pom.xml b/components/camel-printer/pom.xml
index af22695..223cde9 100644
--- a/components/camel-printer/pom.xml
+++ b/components/camel-printer/pom.xml
@@ -56,8 +56,7 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
+ <artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-reactive-streams/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/pom.xml b/components/camel-reactive-streams/pom.xml
index 98f127a..5a0d009 100644
--- a/components/camel-reactive-streams/pom.xml
+++ b/components/camel-reactive-streams/pom.xml
@@ -94,12 +94,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-reactor/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-reactor/pom.xml b/components/camel-reactor/pom.xml
index 90f0020..464a0f2 100644
--- a/components/camel-reactor/pom.xml
+++ b/components/camel-reactor/pom.xml
@@ -86,12 +86,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-servicenow/camel-servicenow-component/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/camel-servicenow-component/pom.xml b/components/camel-servicenow/camel-servicenow-component/pom.xml
index 6aa16a9..2e550eb 100644
--- a/components/camel-servicenow/camel-servicenow-component/pom.xml
+++ b/components/camel-servicenow/camel-servicenow-component/pom.xml
@@ -148,18 +148,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>java-hamcrest</artifactId>
- <version>${hamcrest-version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-spark-rest/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-spark-rest/pom.xml b/components/camel-spark-rest/pom.xml
index 52d190a..3396450 100644
--- a/components/camel-spark-rest/pom.xml
+++ b/components/camel-spark-rest/pom.xml
@@ -104,8 +104,7 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
+ <artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/components/camel-telegram/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-telegram/pom.xml b/components/camel-telegram/pom.xml
index ca03f17..ef718dd 100644
--- a/components/camel-telegram/pom.xml
+++ b/components/camel-telegram/pom.xml
@@ -83,8 +83,7 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito-version}</version>
+ <artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/d4d5ad37/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 87e4aba..51af847 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -499,7 +499,7 @@
<minimal-json-version>0.9.4</minimal-json-version>
<mock-javamail-version>1.9</mock-javamail-version>
<mockwebserver-version>0.0.15</mockwebserver-version>
- <mockito-version>1.10.19</mockito-version>
+ <mockito-version>2.10.0</mockito-version>
<mongo-java-driver-version>3.5.0</mongo-java-driver-version>
<mongo-java-driver32-version>3.2.2</mongo-java-driver32-version>
<mongo-hadoop-version>1.5.0</mongo-hadoop-version>