Search in sources :

Example 26 with CaseInsensitiveHeaders

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

the class CaseInsensitiveHeadersTest method testNamesTest1.

@Test
public void testNamesTest1() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    Set<String> result = mmap.names();
    assertNotNull(result);
    assertEquals(0, result.size());
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) Test(org.junit.Test)

Example 27 with CaseInsensitiveHeaders

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

the class CaseInsensitiveHeadersTest method testRemoveTest3.

@Test
public void testRemoveTest3() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    String name = "name";
    MultiMap result = mmap.remove(name);
    assertNotNull(result);
    assertTrue(result.isEmpty());
    assertEquals(0, result.size());
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) Test(org.junit.Test)

Example 28 with CaseInsensitiveHeaders

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

the class CaseInsensitiveHeadersTest method testSetTest3.

@Test
public void testSetTest3() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    HashMap<String, String> headers = new HashMap<String, String>();
    headers.put("aaa", "bbb");
    MultiMap result = mmap.setAll(headers);
    assertNotNull(result);
    assertFalse(result.isEmpty());
    assertEquals(1, result.size());
    assertEquals("aaa: bbb\n", result.toString());
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) HashMap(java.util.HashMap) Test(org.junit.Test)

Example 29 with CaseInsensitiveHeaders

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

the class CaseInsensitiveHeadersTest method testContainsTest3.

@Test
public void testContainsTest3() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    String name = "0123456789";
    boolean result = mmap.contains(name);
    assertFalse(result);
    mmap.add(name, "");
    result = mmap.contains(name);
    assertTrue(result);
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) Test(org.junit.Test)

Example 30 with CaseInsensitiveHeaders

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

the class CaseInsensitiveHeadersTest method testAddTest10.

@Test
public void testAddTest10() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    String name = "a";
    ArrayList<CharSequence> values = new ArrayList<CharSequence>();
    values.add("somevalue");
    assertEquals("a: somevalue\n", mmap.add(name, values).toString());
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Aggregations

CaseInsensitiveHeaders (io.vertx.core.http.CaseInsensitiveHeaders)69 MultiMap (io.vertx.core.MultiMap)65 Test (org.junit.Test)64 ArrayList (java.util.ArrayList)10 HashMap (java.util.HashMap)10 Buffer (io.vertx.core.buffer.Buffer)3 VxApiServerURLInfo (com.szmirren.vxApi.core.entity.VxApiServerURLInfo)2 VxApiTrackInfos (com.szmirren.vxApi.core.entity.VxApiTrackInfos)2 VxApiParamOptions (com.szmirren.vxApi.core.options.VxApiParamOptions)2 HttpClientRequest (io.vertx.core.http.HttpClientRequest)2 HttpServerResponse (io.vertx.core.http.HttpServerResponse)2 JsonObject (io.vertx.core.json.JsonObject)2 ConnectException (java.net.ConnectException)2 Map (java.util.Map)2 TimeoutException (java.util.concurrent.TimeoutException)2 QueryStringDecoder (io.netty.handler.codec.http.QueryStringDecoder)1 QueryStringEncoder (io.netty.handler.codec.http.QueryStringEncoder)1 WebSocket (io.vertx.core.http.WebSocket)1 WebSocketFrame (io.vertx.core.http.WebSocketFrame)1 FrameType (io.vertx.core.http.impl.FrameType)1