Search in sources :

Example 56 with CaseInsensitiveHeaders

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

the class CaseInsensitiveHeadersTest method testSetTest9.

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

Example 57 with CaseInsensitiveHeaders

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

the class CaseInsensitiveHeadersTest method testClearTest1.

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

Example 58 with CaseInsensitiveHeaders

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

the class CaseInsensitiveHeadersTest method testSetTest12.

@Test
public void testSetTest12() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    String name = "aaa";
    String strVal = "bbb";
    MultiMap result = mmap.set(name, strVal);
    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) Test(org.junit.Test)

Example 59 with CaseInsensitiveHeaders

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

the class CaseInsensitiveHeadersTest method testGetAll.

@Test
public void testGetAll() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    String name = "name";
    mmap.add(name, "value1");
    mmap.add(name, "value2");
    List<String> result = mmap.getAll(name);
    assertNotNull(result);
    assertEquals(2, result.size());
    assertEquals("value1", result.get(0));
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) Test(org.junit.Test)

Example 60 with CaseInsensitiveHeaders

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

the class CaseInsensitiveHeadersTest method testAddTest7.

@Test
public void testAddTest7() throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    CharSequence name = "name";
    CharSequence value = "value";
    assertEquals("name: value\n", mmap.add(name, value).toString());
}
Also used : MultiMap(io.vertx.core.MultiMap) CaseInsensitiveHeaders(io.vertx.core.http.CaseInsensitiveHeaders) 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