use of io.vertx.core.MultiMap in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testSetTest13.
@Test
public void testSetTest13() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
String name = "aaa";
String strVal = "";
MultiMap result = mmap.set(name, strVal);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals("aaa: \n", result.toString());
}
use of io.vertx.core.MultiMap in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testContainsTest1.
@Test
public void testContainsTest1() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
CharSequence name = String.valueOf(new Object());
assertFalse(mmap.contains(name));
}
use of io.vertx.core.MultiMap in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testGetAllTest3.
@Test
public void testGetAllTest3() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
String name = "name";
List<String> result = mmap.getAll(name);
assertNotNull(result);
assertEquals(0, result.size());
}
use of io.vertx.core.MultiMap in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testAddTest14.
@Test
public void testAddTest14() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
String name = "";
String strVal = "aaa";
assertEquals(": aaa\n", mmap.add(name, strVal).toString());
}
use of io.vertx.core.MultiMap in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testMapEntrySetValue.
/*
* unit tests for public method in MapEntry
* (isn't actually used in the implementation)
*/
@Test
public void testMapEntrySetValue() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
mmap.add("Header", "oldvalue");
for (Map.Entry<String, String> me : mmap) {
me.setValue("newvalue");
}
assertEquals("newvalue", mmap.get("Header"));
}
Aggregations