Merge pull request #4977 from dkapil/task/BAEL-8143

Task/bael 8143
This commit is contained in:
Loredana Crusoveanu 2018-08-16 22:26:39 +03:00 committed by GitHub
commit 72e3444eb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 16 additions and 34 deletions

View File

@ -137,7 +137,7 @@
<aws-lambda-java-core.version>1.1.0</aws-lambda-java-core.version> <aws-lambda-java-core.version>1.1.0</aws-lambda-java-core.version>
<gson.version>2.8.0</gson.version> <gson.version>2.8.0</gson.version>
<aws-java-sdk.version>1.11.290</aws-java-sdk.version> <aws-java-sdk.version>1.11.290</aws-java-sdk.version>
<mockito-core.version>2.8.9</mockito-core.version> <mockito-core.version>2.21.0</mockito-core.version>
<assertj-core.version>3.8.0</assertj-core.version> <assertj-core.version>3.8.0</assertj-core.version>
<dynamodblocal.version>1.11.86</dynamodblocal.version> <dynamodblocal.version>1.11.86</dynamodblocal.version>
<dynamodblocal.repository.url>https://s3-us-west-2.amazonaws.com/dynamodb-local/release</dynamodblocal.repository.url> <dynamodblocal.repository.url>https://s3-us-west-2.amazonaws.com/dynamodb-local/release</dynamodblocal.repository.url>

View File

@ -213,7 +213,7 @@
<web3j.core.version>3.3.1</web3j.core.version> <web3j.core.version>3.3.1</web3j.core.version>
<springframework.version>5.0.5.RELEASE</springframework.version> <springframework.version>5.0.5.RELEASE</springframework.version>
<spring.boot.version>1.5.6.RELEASE</spring.boot.version> <spring.boot.version>1.5.6.RELEASE</spring.boot.version>
<mockito.version>1.10.19</mockito.version> <mockito.version>2.21.0</mockito.version>
<jackson-databind.version>2.5.0</jackson-databind.version> <jackson-databind.version>2.5.0</jackson-databind.version>
<hamcrest.version>1.3</hamcrest.version> <hamcrest.version>1.3</hamcrest.version>
<jackson.version>2.9.3</jackson.version> <jackson.version>2.9.3</jackson.version>

View File

@ -84,7 +84,7 @@
<spring-test.version>5.0.5.RELEASE</spring-test.version> <spring-test.version>5.0.5.RELEASE</spring-test.version>
<gson.version>2.8.2</gson.version> <gson.version>2.8.2</gson.version>
<assertj.version>3.9.1</assertj.version> <assertj.version>3.9.1</assertj.version>
<mockito.version>2.18.3</mockito.version> <mockito.version>2.21.0</mockito.version>
<commons-fileupload.version>1.3.3</commons-fileupload.version> <commons-fileupload.version>1.3.3</commons-fileupload.version>
<commons-io.version>2.6</commons-io.version> <commons-io.version>2.6</commons-io.version>
<javax.servlet-api.version>4.0.1</javax.servlet-api.version> <javax.servlet-api.version>4.0.1</javax.servlet-api.version>

View File

@ -1238,7 +1238,7 @@
<!-- <gib.enabled>false</gib.enabled> --> <!-- <gib.enabled>false</gib.enabled> -->
<junit.version>4.12</junit.version> <junit.version>4.12</junit.version>
<org.hamcrest.version>1.3</org.hamcrest.version> <org.hamcrest.version>1.3</org.hamcrest.version>
<mockito.version>2.8.9</mockito.version> <mockito.version>2.21.0</mockito.version>
<!-- logging --> <!-- logging -->
<org.slf4j.version>1.7.21</org.slf4j.version> <org.slf4j.version>1.7.21</org.slf4j.version>
<logback.version>1.1.7</logback.version> <logback.version>1.1.7</logback.version>

View File

@ -16,11 +16,6 @@
</parent> </parent>
<dependencies> <dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId> <artifactId>spring-test</artifactId>
@ -82,15 +77,7 @@
</plugins> </plugins>
</build> </build>
<repositories>
<repository>
<id>java.net</id>
<url>https://maven.java.net/content/repositories/releases/</url>
</repository>
</repositories>
<properties> <properties>
<mockito.version>1.10.19</mockito.version>
<mockito.spring.boot.version>1.4.4.RELEASE</mockito.spring.boot.version> <mockito.spring.boot.version>1.4.4.RELEASE</mockito.spring.boot.version>
<javax.inject.version>1</javax.inject.version> <javax.inject.version>1</javax.inject.version>
<guava.version>20.0</guava.version> <guava.version>20.0</guava.version>

View File

@ -24,13 +24,13 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId> <artifactId>mockito-core</artifactId>
<version>${mockito.version}</version> <version>${mockito.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
<properties> <properties>
<mockito.version>1.10.19</mockito.version> <mockito.version>2.21.0</mockito.version>
</properties> </properties>
</project> </project>

View File

@ -3,7 +3,7 @@ package com.baeldung.domain.util;
import com.baeldung.domain.model.Message; import com.baeldung.domain.model.Message;
import org.mockito.ArgumentMatcher; import org.mockito.ArgumentMatcher;
public class MessageMatcher extends ArgumentMatcher<Message> { public class MessageMatcher implements ArgumentMatcher<Message> {
private Message left; private Message left;
@ -12,16 +12,11 @@ public class MessageMatcher extends ArgumentMatcher<Message> {
} }
@Override @Override
public boolean matches(Object object) { public boolean matches(Message right) {
if (object instanceof Message) {
Message right = (Message) object;
return left.getFrom().equals(right.getFrom()) && return left.getFrom().equals(right.getFrom()) &&
left.getTo().equals(right.getTo()) && left.getTo().equals(right.getTo()) &&
left.getText().equals(right.getText()) && left.getText().equals(right.getText()) &&
right.getDate() != null && right.getDate() != null &&
right.getId() != null; right.getId() != null;
} }
return false;
}
} }

View File

@ -15,6 +15,6 @@
</parent> </parent>
<properties> <properties>
<mockito.version>2.8.9</mockito.version> <mockito.version>2.21.0</mockito.version>
</properties> </properties>
</project> </project>

View File

@ -46,7 +46,7 @@
</build> </build>
<properties> <properties>
<mockito.version>2.9.0</mockito.version> <mockito.version>2.21.0</mockito.version>
<easymock.version>3.5.1</easymock.version> <easymock.version>3.5.1</easymock.version>
<jmockit.version>1.34</jmockit.version> <jmockit.version>1.34</jmockit.version>
</properties> </properties>

View File

@ -104,7 +104,7 @@
<junit.vintage.version>4.12.1</junit.vintage.version> <junit.vintage.version>4.12.1</junit.vintage.version>
<log4j2.version>2.8.2</log4j2.version> <log4j2.version>2.8.2</log4j2.version>
<h2.version>1.4.196</h2.version> <h2.version>1.4.196</h2.version>
<mockito.version>2.11.0</mockito.version> <mockito.version>2.21.0</mockito.version>
<spring.version>5.0.1.RELEASE</spring.version> <spring.version>5.0.1.RELEASE</spring.version>
<testcontainers.version>1.7.2</testcontainers.version> <testcontainers.version>1.7.2</testcontainers.version>
<postgresql.version>42.2.2</postgresql.version> <postgresql.version>42.2.2</postgresql.version>