use of io.vertx.core.http.CaseInsensitiveHeaders in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testSetTest2.
@Test
public void testSetTest2() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
HashMap<String, String> headers = new HashMap<String, String>();
headers.put("", "");
headers.put("aaa", "bbb");
MultiMap result = mmap.setAll(headers);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(2, result.size());
assertEquals(": \naaa: bbb\n", result.toString());
}
use of io.vertx.core.http.CaseInsensitiveHeaders in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testAddTest9.
@Test
public void testAddTest9() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
String name = "";
ArrayList<CharSequence> values = new ArrayList<CharSequence>();
values.add("somevalue");
assertEquals(": somevalue\n", mmap.add(name, values).toString());
}
use of io.vertx.core.http.CaseInsensitiveHeaders in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testAddTest12.
@Test
public void testAddTest12() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
String name = "a";
String strVal = "b";
assertEquals("a: b\n", mmap.add(name, strVal).toString());
}
use of io.vertx.core.http.CaseInsensitiveHeaders in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testSetTest7.
@Test
public void testSetTest7() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
CharSequence name = "name";
CharSequence value = "value";
MultiMap result = mmap.set(name, value);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals("name: value\n", result.toString());
}
use of io.vertx.core.http.CaseInsensitiveHeaders in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testSetTest10.
@Test
public void testSetTest10() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
String name = "aaa";
ArrayList<CharSequence> values = new ArrayList<CharSequence>();
values.add("somevalue");
assertEquals("aaa: somevalue\n", mmap.set(name, values).toString());
}
Aggregations