use of io.vertx.core.http.impl.headers.Http2HeadersAdaptor in project vert.x by eclipse.
the class HeadersTestBase method testSetAllOnExistingMapUsingMultiMapHttp2.
@Test
public void testSetAllOnExistingMapUsingMultiMapHttp2() {
MultiMap mainMap = new Http2HeadersAdaptor(new DefaultHttp2Headers());
mainMap.add("originalKey", "originalValue");
MultiMap setAllMap = newMultiMap();
setAllMap.add("originalKey", "newValue");
setAllMap.add("anotherKey", "anotherValue");
MultiMap result = mainMap.setAll(setAllMap);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(2, result.size());
assertEquals("newValue", result.get("originalKey"));
assertEquals("anotherValue", result.get("anotherKey"));
}
use of io.vertx.core.http.impl.headers.Http2HeadersAdaptor in project vert.x by eclipse.
the class HeadersTestBase method testSetAllOnExistingMapUsingHashMapHttp2.
@Test
public void testSetAllOnExistingMapUsingHashMapHttp2() {
MultiMap mainMap = new Http2HeadersAdaptor(new DefaultHttp2Headers());
mainMap.add("originalKey", "originalValue");
Map<String, String> setAllMap = new HashMap<>();
setAllMap.put("originalKey", "newValue");
setAllMap.put("anotherKey", "anotherValue");
MultiMap result = mainMap.setAll(setAllMap);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(2, result.size());
assertEquals("newValue", result.get("originalKey"));
assertEquals("anotherValue", result.get("anotherKey"));
}
use of io.vertx.core.http.impl.headers.Http2HeadersAdaptor in project vert.x by eclipse.
the class Http2HeadersAdaptorsTest method setUp.
@Before
public void setUp() {
headers = new DefaultHttp2Headers();
map = new Http2HeadersAdaptor(headers);
}
Aggregations