use of io.vertx.core.MultiMap in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testAddTest1.
@Test
public void testAddTest1() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
HashMap<String, String> map = new HashMap<String, String>();
map.put("a", "b");
MultiMap result = mmap.addAll(map);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals("a: b\n", result.toString());
}
use of io.vertx.core.MultiMap in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testSetTest4.
@Test
public void testSetTest4() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
Map<String, String> headers = new HashMap<String, String>();
MultiMap result = mmap.setAll(headers);
assertNotNull(result);
assertTrue(result.isEmpty());
assertEquals(0, result.size());
assertEquals("", result.toString());
}
use of io.vertx.core.MultiMap in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testRemoveTest1.
@Test
public void testRemoveTest1() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
CharSequence name = String.valueOf(new Object());
MultiMap result = mmap.remove(name);
assertNotNull(result);
assertTrue(result.isEmpty());
assertEquals(0, result.size());
}
use of io.vertx.core.MultiMap in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testIteratorTest1.
@Test
public void testIteratorTest1() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
Iterator<Map.Entry<String, String>> result = mmap.iterator();
assertNotNull(result);
assertFalse(result.hasNext());
}
use of io.vertx.core.MultiMap in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testMapEntrySetValueNull.
@Test(expected = NullPointerException.class)
public void testMapEntrySetValueNull() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
mmap.add("Header", "oldvalue");
for (Map.Entry<String, String> me : mmap) {
me.setValue(null);
}
}
Aggregations