use of okhttp3.Response in project sonarqube by SonarSource.
the class HttpHeadersTest method assertNoCacheInBrowser.
private static void assertNoCacheInBrowser(Response httpResponse) {
CacheControl cacheControl = httpResponse.cacheControl();
assertThat(cacheControl.mustRevalidate()).isTrue();
assertThat(cacheControl.noCache()).isTrue();
assertThat(cacheControl.noStore()).isTrue();
}
use of okhttp3.Response in project sonarqube by SonarSource.
the class CeHttpServerTest method return_http_response_with_code_404_and_exception_message_as_body_when_url_has_no_matching_action.
@Test
public void return_http_response_with_code_404_and_exception_message_as_body_when_url_has_no_matching_action() throws IOException {
String action = "/dfdsfdsfsdsd";
Response response = call(underTest.getUrl() + action);
assertThat(response.code()).isEqualTo(404);
assertThat(response.body().string()).isEqualTo("Error 404, '" + action + "' not found.");
}
use of okhttp3.Response in project sonarqube by SonarSource.
the class CeHttpServerTest method action_is_matched_on_URL_ignoring_case.
@Test
public void action_is_matched_on_URL_ignoring_case() throws IOException {
Response response = call(underTest.getUrl() + "/pOMpoM");
assertIsPomPomResponse(response);
}
use of okhttp3.Response in project sonarqube by SonarSource.
the class CeHttpServerTest method action_is_matched_on_URL_with_parameters.
@Test
public void action_is_matched_on_URL_with_parameters() throws IOException {
Response response = call(underTest.getUrl() + "/pompom?toto=2");
assertIsPomPomResponse(response);
}
use of okhttp3.Response in project sonarqube by SonarSource.
the class CeHttpServerTest method action_is_matched_on_exact_URL.
@Test
public void action_is_matched_on_exact_URL() throws IOException {
Response response = call(underTest.getUrl() + "/pompom");
assertIsPomPomResponse(response);
}
Aggregations