Search in sources :

Example 16 with MultiMap

use of io.vertx.core.MultiMap in project vert.x by eclipse.

the class CaseInsensitiveHeadersTest method testAddTest4.

@Test
public void testAddTest4() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    Map<String, String> map = new HashMap<String, String>();
    assertEquals("", mmap.addAll(map).toString());
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) HashMap(java.util.HashMap) Test(org.junit.Test)

Example 17 with MultiMap

use of io.vertx.core.MultiMap in project vert.x by eclipse.

the class CaseInsensitiveHeadersTest method testMapEntryToString.

@Test
public void testMapEntryToString() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    mmap.add("Header", "value");
    assertEquals("Header: value", mmap.iterator().next().toString());
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) Test(org.junit.Test)

Example 18 with MultiMap

use of io.vertx.core.MultiMap in project vert.x by eclipse.

the class CaseInsensitiveHeadersTest method testGetTest2.

@Test
public void testGetTest2() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    String name = "1";
    assertNull(mmap.get(name));
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) Test(org.junit.Test)

Example 19 with MultiMap

use of io.vertx.core.MultiMap in project vert.x by eclipse.

the class CaseInsensitiveHeadersTest method testAddTest3.

@Test
public void testAddTest3() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    HashMap<String, String> map = new HashMap<String, String>();
    map.put("a", "b");
    assertEquals("a: b\n", mmap.addAll(map).toString());
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) HashMap(java.util.HashMap) Test(org.junit.Test)

Example 20 with MultiMap

use of io.vertx.core.MultiMap in project vert.x by eclipse.

the class CaseInsensitiveHeadersTest method testGetTest1.

@Test
public void testGetTest1() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    CharSequence name = String.valueOf(new Object());
    assertNull(mmap.get(name));
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) Test(org.junit.Test)

Aggregations

MultiMap (io.vertx.core.MultiMap)87 Test (org.junit.Test)75 CaseInsensitiveHeaders (io.vertx.core.http.CaseInsensitiveHeaders)61 HashMap (java.util.HashMap)21 ArrayList (java.util.ArrayList)19 Map (java.util.Map)12 Buffer (io.vertx.core.buffer.Buffer)9 DefaultHttpHeaders (io.netty.handler.codec.http.DefaultHttpHeaders)8 VertxException (io.vertx.core.VertxException)8 HttpClientRequest (io.vertx.core.http.HttpClientRequest)8 HttpMethod (io.vertx.core.http.HttpMethod)8 HeadersAdaptor (io.vertx.core.http.impl.HeadersAdaptor)8 HttpResponseStatus (io.netty.handler.codec.http.HttpResponseStatus)7 InternalLoggerFactory (io.netty.util.internal.logging.InternalLoggerFactory)7 Nullable (io.vertx.codegen.annotations.Nullable)7 AbstractVerticle (io.vertx.core.AbstractVerticle)7 AsyncResult (io.vertx.core.AsyncResult)7 Context (io.vertx.core.Context)7 DeploymentOptions (io.vertx.core.DeploymentOptions)7 Future (io.vertx.core.Future)7