Upgrade to Mockito 4.4.0
Closes gh-284
This commit is contained in:
4
pom.xml
4
pom.xml
@@ -28,7 +28,7 @@
|
||||
<properties>
|
||||
<revision>2.0.0-SNAPSHOT</revision>
|
||||
<disable.checks>false</disable.checks>
|
||||
<java.version>1.6</java.version>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.test.failure.ignore>true</maven.test.failure.ignore>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
@@ -203,7 +203,7 @@
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>1.10.19</version>
|
||||
<version>4.4.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2016 the original author or authors.
|
||||
* Copyright 2006-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,7 +19,8 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
@@ -253,7 +254,7 @@ public class StatefulRetryOperationsInterceptorTests {
|
||||
when(invocation.getArguments()).thenReturn(new Object[] { new Object() });
|
||||
this.interceptor.invoke(invocation);
|
||||
ArgumentCaptor<DefaultRetryState> captor = ArgumentCaptor.forClass(DefaultRetryState.class);
|
||||
verify(template).execute(any(RetryCallback.class), any(RecoveryCallback.class), captor.capture());
|
||||
verify(template).execute(any(RetryCallback.class), eq(null), captor.capture());
|
||||
assertNull(captor.getValue().getKey());
|
||||
}
|
||||
|
||||
@@ -275,7 +276,7 @@ public class StatefulRetryOperationsInterceptorTests {
|
||||
when(invocation.getArguments()).thenReturn(new Object[] { new Object() });
|
||||
this.interceptor.invoke(invocation);
|
||||
ArgumentCaptor<DefaultRetryState> captor = ArgumentCaptor.forClass(DefaultRetryState.class);
|
||||
verify(template).execute(any(RetryCallback.class), any(RecoveryCallback.class), captor.capture());
|
||||
verify(template).execute(any(RetryCallback.class), eq(null), captor.capture());
|
||||
assertEquals("bar", captor.getValue().getKey());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user