Search in sources :

Example 16 with HeadersMultiMap

use of io.vertx.core.http.impl.headers.HeadersMultiMap in project incubator-servicecomb-java-chassis by apache.

the class RequestHeaderItemTest method serverFormattedElementIfNotFound.

@Test
public void serverFormattedElementIfNotFound() {
    HeadersMultiMap headers = new HeadersMultiMap();
    String testValue = "testValue";
    headers.add("anotherKey", testValue);
    when(routingContext.request()).thenReturn(serverRequest);
    when(serverRequest.headers()).thenReturn(headers);
    ELEMENT.appendServerFormattedItem(accessLogEvent, strBuilder);
    assertEquals("-", strBuilder.toString());
}
Also used : HeadersMultiMap(io.vertx.core.http.impl.headers.HeadersMultiMap) Test(org.junit.Test)

Aggregations

HeadersMultiMap (io.vertx.core.http.impl.headers.HeadersMultiMap)16 Test (org.junit.Test)13 ByteBuf (io.netty.buffer.ByteBuf)1 ByteBufAllocator (io.netty.buffer.ByteBufAllocator)1 CompositeByteBuf (io.netty.buffer.CompositeByteBuf)1 Unpooled (io.netty.buffer.Unpooled)1 ChannelHandlerContext (io.netty.channel.ChannelHandlerContext)1 SimpleChannelInboundHandler (io.netty.channel.SimpleChannelInboundHandler)1 EmbeddedChannel (io.netty.channel.embedded.EmbeddedChannel)1 DefaultFullHttpResponse (io.netty.handler.codec.http.DefaultFullHttpResponse)1 FullHttpResponse (io.netty.handler.codec.http.FullHttpResponse)1 HttpHeaderNames (io.netty.handler.codec.http.HttpHeaderNames)1 HttpHeaders (io.netty.handler.codec.http.HttpHeaders)1 HttpRequest (io.netty.handler.codec.http.HttpRequest)1 HttpRequestDecoder (io.netty.handler.codec.http.HttpRequestDecoder)1 HttpResponseEncoder (io.netty.handler.codec.http.HttpResponseEncoder)1 HttpResponseStatus (io.netty.handler.codec.http.HttpResponseStatus)1 HttpVersion (io.netty.handler.codec.http.HttpVersion)1 AsciiString (io.netty.util.AsciiString)1 CharsetUtil (io.netty.util.CharsetUtil)1