Search in sources :

Example 31 with HttpHeader

use of com.github.mjeanroy.junit.servers.client.HttpHeader in project junit-servers by mjeanroy.

the class AbstractHttpResponseImplTest method it_should_get_x_content_type_options_header.

@Test
void it_should_get_x_content_type_options_header() {
    final String name = "X-Content-Type-Options";
    final String value = "nosniff";
    final V response = createHttpResponseWithHeader(name, value);
    final HttpHeader header = response.getXContentTypeOptions();
    assertHeader(header, name, value);
}
Also used : HttpHeader(com.github.mjeanroy.junit.servers.client.HttpHeader) Test(org.junit.jupiter.api.Test)

Aggregations

HttpHeader (com.github.mjeanroy.junit.servers.client.HttpHeader)31 Test (org.junit.jupiter.api.Test)21 ArrayList (java.util.ArrayList)4 Cookie (com.github.mjeanroy.junit.servers.client.Cookie)3 HttpResponse (com.github.mjeanroy.junit.servers.client.HttpResponse)2 Pair (com.github.mjeanroy.junit.servers.utils.commons.Pair)2 WireMockTest (com.github.mjeanroy.junit.servers.utils.jupiter.WireMockTest)2 Map (java.util.Map)2 Header (org.apache.http.Header)2 HttpClientConfiguration (com.github.mjeanroy.junit.servers.client.HttpClientConfiguration)1 HttpRequest (com.github.mjeanroy.junit.servers.client.HttpRequest)1 HttpRequestBodies.multipartBuilder (com.github.mjeanroy.junit.servers.client.HttpRequestBodies.multipartBuilder)1 HttpUrl (com.github.mjeanroy.junit.servers.client.HttpUrl)1 ToStringBuilder (com.github.mjeanroy.junit.servers.commons.lang.ToStringBuilder)1 EmbeddedServerMockBuilder (com.github.mjeanroy.junit.servers.utils.builders.EmbeddedServerMockBuilder)1 FluentCaseInsensitiveStringsMap (com.ning.http.client.FluentCaseInsensitiveStringsMap)1 HttpHeaders (io.netty.handler.codec.http.HttpHeaders)1 HashMap (java.util.HashMap)1 List (java.util.List)1