Commit 582bd665 authored by Jeremie Bresson's avatar Jeremie Bresson
Browse files

Applied replacement: Mockito.<Object>any() ==> Mockito.any(Object[].class)



Co-authored-by: default avatarGabriel Barbier <gabriel.barbier-ext@nickel.eu>
parent 94dd7e0e
...@@ -35,7 +35,7 @@ public class TestCommitDiscussionsApi implements Constants { ...@@ -35,7 +35,7 @@ public class TestCommitDiscussionsApi implements Constants {
response = new MockResponse(Discussion.class, null, "commit-discussions.json"); response = new MockResponse(Discussion.class, null, "commit-discussions.json");
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient); when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true); when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response); when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
} }
@Test @Test
......
...@@ -34,7 +34,7 @@ public class TestEpicDiscussionsApi implements Constants { ...@@ -34,7 +34,7 @@ public class TestEpicDiscussionsApi implements Constants {
response = new MockResponse(Discussion.class, null, "epic-discussions.json"); response = new MockResponse(Discussion.class, null, "epic-discussions.json");
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient); when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true); when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response); when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
} }
@Test @Test
......
...@@ -64,7 +64,7 @@ public class TestExternalStatusCheckApi implements Constants { ...@@ -64,7 +64,7 @@ public class TestExternalStatusCheckApi implements Constants {
response = new MockResponse(ExternalStatusCheck.class, null, "external-status-checks.json"); response = new MockResponse(ExternalStatusCheck.class, null, "external-status-checks.json");
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient); when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true); when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response); when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
} }
@Test @Test
...@@ -96,6 +96,6 @@ public class TestExternalStatusCheckApi implements Constants { ...@@ -96,6 +96,6 @@ public class TestExternalStatusCheckApi implements Constants {
response = new MockResponse(ExternalStatusCheckStatus.class, null, "external-status-check-statuses.json"); response = new MockResponse(ExternalStatusCheckStatus.class, null, "external-status-check-statuses.json");
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient); when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true); when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response); when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
} }
} }
...@@ -34,7 +34,7 @@ public class TestIssueDiscussionsApi implements Constants { ...@@ -34,7 +34,7 @@ public class TestIssueDiscussionsApi implements Constants {
response = new MockResponse(Discussion.class, null, "issue-discussions.json"); response = new MockResponse(Discussion.class, null, "issue-discussions.json");
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient); when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true); when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response); when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
} }
@Test @Test
......
...@@ -34,7 +34,7 @@ public class TestMergeRequestDiscussionsApi implements Constants { ...@@ -34,7 +34,7 @@ public class TestMergeRequestDiscussionsApi implements Constants {
response = new MockResponse(Discussion.class, null, "merge-request-discussions.json"); response = new MockResponse(Discussion.class, null, "merge-request-discussions.json");
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient); when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true); when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response); when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
} }
@Test @Test
......
...@@ -63,6 +63,6 @@ public class TestReleaseLinksApi implements Constants { ...@@ -63,6 +63,6 @@ public class TestReleaseLinksApi implements Constants {
response = new MockResponse(Link.class, null, "links.json"); response = new MockResponse(Link.class, null, "links.json");
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient); when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true); when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response); when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
} }
} }
...@@ -34,7 +34,7 @@ public class TestSnippetDiscussionsApi implements Constants { ...@@ -34,7 +34,7 @@ public class TestSnippetDiscussionsApi implements Constants {
response = new MockResponse(Discussion.class, null, "snippet-discussions.json"); response = new MockResponse(Discussion.class, null, "snippet-discussions.json");
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient); when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true); when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response); when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
} }
@Test @Test
......
...@@ -48,7 +48,7 @@ public class TestStreams implements Constants { ...@@ -48,7 +48,7 @@ public class TestStreams implements Constants {
response = new MockResponse(User.class, null, "user-list.json"); response = new MockResponse(User.class, null, "user-list.json");
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient); when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true); when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response); when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
} }
@Test @Test
......
...@@ -33,7 +33,7 @@ public class TestUnitMergeRequestApi { ...@@ -33,7 +33,7 @@ public class TestUnitMergeRequestApi {
when(mockGitLabApi.getApiClient()).thenReturn(mockedGitLabApiClient); when(mockGitLabApi.getApiClient()).thenReturn(mockedGitLabApiClient);
when(mockedGitLabApiClient.validateSecretToken(any())).thenReturn(true); when(mockedGitLabApiClient.validateSecretToken(any())).thenReturn(true);
when(mockedGitLabApiClient.put(attributeCaptor.capture(), Mockito.<Object>any())) when(mockedGitLabApiClient.put(attributeCaptor.capture(), Mockito.any(Object[].class)))
.thenReturn(mockedResponse); .thenReturn(mockedResponse);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment