Skip to content

Commit aea03d3

Browse files
authored
Merge pull request #950 from jmini/update-mockito
Update Mockito and JUnit
2 parents 5d06164 + fabfb5c commit aea03d3

11 files changed

+14
-14
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
<servlet.version>6.0.0</servlet.version>
5656
<activation.version>2.1.1</activation.version>
5757

58-
<junit.version>5.8.2</junit.version>
58+
<junit.version>5.9.2</junit.version>
5959
<testcontainers.version>1.15.3</testcontainers.version>
60-
<mockito.version>4.4.0</mockito.version>
60+
<mockito.version>5.2.0</mockito.version>
6161
<hamcrest.version>1.3</hamcrest.version>
6262
<systemRules.version>1.19.0</systemRules.version>
6363

@@ -432,7 +432,7 @@
432432
<dependency>
433433
<groupId>uk.org.webcompere</groupId>
434434
<artifactId>system-stubs-jupiter</artifactId>
435-
<version>1.2.0</version>
435+
<version>2.0.2</version>
436436
<scope>test</scope>
437437
</dependency>
438438
</dependencies>

src/test/java/org/gitlab4j/api/TestCommitDiscussionsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void setUp() throws Exception {
3535
response = new MockResponse(Discussion.class, null, "commit-discussions.json");
3636
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
3737
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
38-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
38+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
3939
}
4040

4141
@Test

src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void setUp() throws Exception {
3434
response = new MockResponse(Discussion.class, null, "epic-discussions.json");
3535
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
3636
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
37-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
37+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
3838
}
3939

4040
@Test

src/test/java/org/gitlab4j/api/TestExternalStatusCheckApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private void initGetExternalStatusChecks() throws Exception, IOException {
6464
response = new MockResponse(ExternalStatusCheck.class, null, "external-status-checks.json");
6565
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
6666
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
67-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
67+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
6868
}
6969

7070
@Test
@@ -96,6 +96,6 @@ private void initGetExternalStatusCheckStatuses() throws Exception, IOException
9696
response = new MockResponse(ExternalStatusCheckStatus.class, null, "external-status-check-statuses.json");
9797
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
9898
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
99-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
99+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
100100
}
101101
}

src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void setUp() throws Exception {
3434
response = new MockResponse(Discussion.class, null, "issue-discussions.json");
3535
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
3636
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
37-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
37+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
3838
}
3939

4040
@Test

src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void setUp() throws Exception {
3434
response = new MockResponse(Discussion.class, null, "merge-request-discussions.json");
3535
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
3636
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
37-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
37+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
3838
}
3939

4040
@Test

src/test/java/org/gitlab4j/api/TestReleaseLinksApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ private void initGetLinks() throws Exception, IOException {
6363
response = new MockResponse(Link.class, null, "links.json");
6464
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
6565
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
66-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
66+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
6767
}
6868
}

src/test/java/org/gitlab4j/api/TestRepositorySubmodulesApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ private void init() throws Exception, IOException {
4343
response = new MockResponse(Commit.class, "commit.json", null);
4444
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
4545
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
46-
when(gitLabApiClient.put(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
46+
when(gitLabApiClient.put(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
4747
}
4848
}

src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void setUp() throws Exception {
3434
response = new MockResponse(Discussion.class, null, "snippet-discussions.json");
3535
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
3636
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
37-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
37+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
3838
}
3939

4040
@Test

src/test/java/org/gitlab4j/api/TestStreams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void setup() throws Exception {
4848
response = new MockResponse(User.class, null, "user-list.json");
4949
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
5050
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
51-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
51+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
5252
}
5353

5454
@Test

src/test/java/org/gitlab4j/api/TestUnitMergeRequestApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void setUp() throws Exception {
3333
when(mockGitLabApi.getApiClient()).thenReturn(mockedGitLabApiClient);
3434

3535
when(mockedGitLabApiClient.validateSecretToken(any())).thenReturn(true);
36-
when(mockedGitLabApiClient.put(attributeCaptor.capture(), Mockito.<Object>any()))
36+
when(mockedGitLabApiClient.put(attributeCaptor.capture(), Mockito.any(Object[].class)))
3737
.thenReturn(mockedResponse);
3838
}
3939

0 commit comments

Comments
 (0)