Skip to content

Commit e1d51ff

Browse files
committedSep 14, 2021
Mockito core upgraded from 3.2.0 to 3.12.4
1 parent 3893b4c commit e1d51ff

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed
 

‎http/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ dependencies {
2828
implementation fileTree(dir: 'libs', include: ['*.jar'])
2929
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.0'
3030
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.0'
31-
testImplementation 'org.mockito:mockito-core:3.2.0'
31+
testImplementation 'org.mockito:mockito-core:3.12.4'
32+
testImplementation 'org.mockito:mockito-junit-jupiter:3.12.4'
3233
testImplementation 'org.hamcrest:hamcrest-library:2.2'
3334
testImplementation 'com.squareup.okhttp3:okhttp:4.9.1'
3435
testImplementation project(path: ':cli')

‎http/src/test/java/ro/polak/http/errorhandler/impl/HttpError500HandlerTest.java

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
package ro.polak.http.errorhandler.impl;
22

3+
import static org.hamcrest.MatcherAssert.assertThat;
4+
import static org.hamcrest.Matchers.containsString;
5+
import static org.mockito.Mockito.mock;
6+
import static org.mockito.Mockito.verify;
7+
import static org.mockito.Mockito.when;
8+
39
import org.junit.jupiter.api.BeforeEach;
410
import org.junit.jupiter.api.Test;
11+
import org.junit.jupiter.api.extension.ExtendWith;
512
import org.mockito.ArgumentCaptor;
613
import org.mockito.Captor;
7-
import org.mockito.MockitoAnnotations;
14+
import org.mockito.junit.jupiter.MockitoExtension;
815

916
import java.io.IOException;
1017
import java.io.PrintWriter;
1118

1219
import ro.polak.http.servlet.impl.HttpServletResponseImpl;
1320

14-
import static org.hamcrest.MatcherAssert.assertThat;
15-
import static org.hamcrest.Matchers.containsString;
16-
import static org.mockito.Mockito.mock;
17-
import static org.mockito.Mockito.verify;
18-
import static org.mockito.Mockito.when;
19-
2021
// CHECKSTYLE.OFF: JavadocType
22+
@ExtendWith(MockitoExtension.class)
2123
public final class HttpError500HandlerTest {
2224

2325
private static HttpServletResponseImpl httpServletResponse;
@@ -29,7 +31,6 @@ public final class HttpError500HandlerTest {
2931

3032
@BeforeEach
3133
public void setUp() {
32-
MockitoAnnotations.initMocks(this);
3334
httpServletResponse = mock(HttpServletResponseImpl.class);
3435
printWriter = mock(PrintWriter.class);
3536
when(httpServletResponse.getWriter()).thenReturn(printWriter);

0 commit comments

Comments
 (0)
Failed to load comments.