use of org.sonarqube.ws.client.WsResponse in project sonarqube by SonarSource.
the class WsTestUtil method mockReader.
public static void mockReader(ScannerWsClient mock, Reader reader) {
WsResponse response = mock(WsResponse.class);
when(response.contentReader()).thenReturn(reader);
when(mock.call(any(WsRequest.class))).thenReturn(response);
}
use of org.sonarqube.ws.client.WsResponse in project sonarqube by SonarSource.
the class WsTestUtil method mockReader.
public static void mockReader(ScannerWsClient mock, String path, Reader reader) {
WsResponse response = mock(WsResponse.class);
when(response.contentReader()).thenReturn(reader);
when(mock.call(argThat(new RequestMatcher(path)))).thenReturn(response);
}
use of org.sonarqube.ws.client.WsResponse in project sonarqube by SonarSource.
the class UpgradeTest method checkUrlIsReturningNotFound.
private void checkUrlIsReturningNotFound(String url) {
WsResponse response = newWsClient(orchestrator).wsConnector().call(new GetRequest(url));
assertThat(response.code()).isEqualTo(HttpURLConnection.HTTP_NOT_FOUND);
}
Aggregations