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/25 11:07:32 UTC
[camel] branch master updated: CAMEL-11869: Upgrade mockito-core to
version 2.11.0 for camel-weather
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 1822e8c CAMEL-11869: Upgrade mockito-core to version 2.11.0 for camel-weather
1822e8c is described below
commit 1822e8ca9d9675c6e72172aab274d1e39c32608c
Author: aldettinger <al...@gmail.com>
AuthorDate: Sat Nov 25 12:06:35 2017 +0100
CAMEL-11869: Upgrade mockito-core to version 2.11.0 for camel-weather
---
components/camel-weather/pom.xml | 3 ++-
.../java/org/apache/camel/component/weather/WeatherQueryTest.java | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/components/camel-weather/pom.xml b/components/camel-weather/pom.xml
index b5abec9..3a0026c 100644
--- a/components/camel-weather/pom.xml
+++ b/components/camel-weather/pom.xml
@@ -56,7 +56,7 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
@@ -75,6 +75,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
+ <version>${mockito2-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/components/camel-weather/src/test/java/org/apache/camel/component/weather/WeatherQueryTest.java b/components/camel-weather/src/test/java/org/apache/camel/component/weather/WeatherQueryTest.java
index 6d1145e..35bf353 100644
--- a/components/camel-weather/src/test/java/org/apache/camel/component/weather/WeatherQueryTest.java
+++ b/components/camel-weather/src/test/java/org/apache/camel/component/weather/WeatherQueryTest.java
@@ -22,7 +22,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
@@ -34,6 +34,7 @@ public class WeatherQueryTest {
private static final String LONGITUDE = "4.13";
private static final String LATITUDE = "51.98";
private static final String APPID = "9162755b2efa555823cfe0451d7fff38";
+
@Mock
private GeoLocationProvider geoLocationProvider;
@@ -44,7 +45,6 @@ public class WeatherQueryTest {
public void setup() throws Exception {
GeoLocation location = new GeoLocation(LONGITUDE, LATITUDE);
when(geoLocationProvider.getCurrentGeoLocation()).thenReturn(location);
- when(exceptionThrowingGeoLocationProvider.getCurrentGeoLocation()).thenThrow(new IllegalStateException("Error in getting current location"));
}
@Test
--
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].