use of io.vertx.core.MultiMap 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());
}
use of io.vertx.core.MultiMap 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());
}
use of io.vertx.core.MultiMap 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));
}
use of io.vertx.core.MultiMap 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());
}
use of io.vertx.core.MultiMap 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());
}
Aggregations