diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2018-01-10 20:42:03 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2018-01-14 20:37:37 +0100 |
commit | 4a5be9fbaba0b9729e909eec935852c56f6e71e2 (patch) | |
tree | f6f73398d587abf3c2dd460bb9a8813a99b95fc6 /sonar-ws/src/test | |
parent | 93c6c4ccda2bf18fc651b215576172810a1f8725 (diff) | |
download | sonarqube-4a5be9fbaba0b9729e909eec935852c56f6e71e2.tar.gz sonarqube-4a5be9fbaba0b9729e909eec935852c56f6e71e2.zip |
Upgrade Mockito from 1.10.19 to 2.13.0
Diffstat (limited to 'sonar-ws/src/test')
-rw-r--r-- | sonar-ws/src/test/java/org/sonarqube/ws/client/LocalWsConnectorTest.java | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/LocalWsConnectorTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/LocalWsConnectorTest.java index c4983eaf09f..79b6c6e4583 100644 --- a/sonar-ws/src/test/java/org/sonarqube/ws/client/LocalWsConnectorTest.java +++ b/sonar-ws/src/test/java/org/sonarqube/ws/client/LocalWsConnectorTest.java @@ -25,9 +25,8 @@ import java.util.Collections; import java.util.List; import java.util.Map; import org.apache.commons.io.IOUtils; -import org.hamcrest.Description; -import org.hamcrest.TypeSafeMatcher; import org.junit.Test; +import org.mockito.ArgumentMatcher; import org.sonar.api.server.ws.LocalConnector; import org.sonarqube.ws.MediaTypes; @@ -87,12 +86,11 @@ public class LocalWsConnectorTest { when(connector.call(any(LocalConnector.LocalRequest.class))).thenReturn(response); } - private void verifyRequested(final String expectedMethod, final String expectedPath, - final String expectedMediaType, - final Map<String, String> expectedParams) { - verify(connector).call(argThat(new TypeSafeMatcher<LocalConnector.LocalRequest>() { + private void verifyRequested(String expectedMethod, String expectedPath, + String expectedMediaType, Map<String, String> expectedParams) { + verify(connector).call(argThat(new ArgumentMatcher<LocalConnector.LocalRequest>() { @Override - protected boolean matchesSafely(LocalConnector.LocalRequest localRequest) { + public boolean matches(LocalConnector.LocalRequest localRequest) { boolean ok = localRequest.getMethod().equals(expectedMethod) && localRequest.getPath().equals(expectedPath); ok &= localRequest.getMediaType().equals(expectedMediaType); for (Map.Entry<String, String> expectedParam : expectedParams.entrySet()) { @@ -102,10 +100,6 @@ public class LocalWsConnectorTest { } return ok; } - - @Override - public void describeTo(Description description) { - } })); } |