use of io.vertx.core.http.CaseInsensitiveHeaders in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testSetTest8.
@Test
public void testSetTest8() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
CharSequence name = "name";
ArrayList<CharSequence> values = new ArrayList<CharSequence>();
values.add("somevalue");
assertEquals("name: somevalue\n", mmap.set(name, values).toString());
}
use of io.vertx.core.http.CaseInsensitiveHeaders in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testSetIterable.
@Test
public void testSetIterable() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
String name = "name";
List<String> values = new ArrayList<String>();
values.add("value1");
values.add(null);
MultiMap result = mmap.set(name, values);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals("name: value1\n", result.toString());
}
use of io.vertx.core.http.CaseInsensitiveHeaders in project vert.x by eclipse.
the class CaseInsensitiveHeadersTest method testSetTest11.
@Test
public void testSetTest11() throws Exception {
MultiMap mmap = new CaseInsensitiveHeaders();
String name = "";
String strVal = "";
MultiMap result = mmap.set(name, strVal);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals(": \n", result.toString());
}
use of io.vertx.core.http.CaseInsensitiveHeaders 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.http.CaseInsensitiveHeaders 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());
}
Aggregations