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());
}
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());
}
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());
}
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);
}
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());
}
Aggregations