本文整理了Java中io.vertx.core.MultiMap.isEmpty()
方法的一些代码示例,展示了MultiMap.isEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.isEmpty()
方法的具体详情如下:
包路径:io.vertx.core.MultiMap
类名称:MultiMap
方法名:isEmpty
[英]Return true if empty
[中]如果为空,则返回true
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testIsEmptyTest1()
throws Exception {
MultiMap mmap = newMultiMap();
assertTrue(mmap.isEmpty());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testSetTest2()
throws Exception {
MultiMap mmap = newMultiMap();
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());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testSetTest1()
throws Exception {
MultiMap mmap = newMultiMap();
HashMap<String, String> headers = new HashMap<String, String>();
headers.put("", "");
MultiMap result = mmap.setAll(headers);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals(": \n", result.toString());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testSetTest3()
throws Exception {
MultiMap mmap = newMultiMap();
HashMap<String, String> headers = new HashMap<String, String>();
headers.put("aaa", "bbb");
MultiMap result = mmap.setAll(headers);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals("aaa: bbb\n", result.toString());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testRemoveTest1()
throws Exception {
MultiMap mmap = newMultiMap();
CharSequence name = String.valueOf(new Object());
MultiMap result = mmap.remove(name);
assertNotNull(result);
assertTrue(result.isEmpty());
assertEquals(0, result.size());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testAddTest1()
throws Exception {
MultiMap mmap = newMultiMap();
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());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testIsEmptyTest2()
throws Exception {
MultiMap mmap = newMultiMap();
mmap.add("a", "b");
assertFalse(mmap.isEmpty());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testSetTest4()
throws Exception {
MultiMap mmap = newMultiMap();
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());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testSetIterableEmpty()
throws Exception {
MultiMap mmap = newMultiMap();
String name = "name";
List<String> values = new ArrayList<String>();
MultiMap result = mmap.set(name, values);
assertNotNull(result);
assertTrue(result.isEmpty());
assertEquals(0, result.size());
assertEquals("", result.toString());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testNoParams() {
server.requestHandler(req -> {
assertNull(req.query());
assertTrue(req.params().isEmpty());
req.response().end();
});
server.listen(onSuccess(server -> {
client.request(HttpMethod.GET, DEFAULT_HTTP_PORT, DEFAULT_HTTP_HOST, DEFAULT_TEST_URI, resp -> testComplete()).end();
}));
await();
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testCaseInsensitiveHeaders()
throws Exception {
MultiMap result = newMultiMap();
assertNotNull(result);
assertTrue(result.isEmpty());
assertEquals(0, result.size());
assertEquals("", result.toString());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testSetTest13()
throws Exception {
MultiMap mmap = newMultiMap();
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());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testSetTest14()
throws Exception {
MultiMap mmap = newMultiMap();
String name = "";
String strVal = "bbb";
MultiMap result = mmap.set(name, strVal);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals(": bbb\n", result.toString());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testSetTest12()
throws Exception {
MultiMap mmap = newMultiMap();
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());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testSetTest7()
throws Exception {
MultiMap mmap = newMultiMap();
CharSequence name = "name";
CharSequence value = "value";
MultiMap result = mmap.set(name, value);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals("name: value\n", result.toString());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testSetTest11()
throws Exception {
MultiMap mmap = newMultiMap();
String name = "";
String strVal = "";
MultiMap result = mmap.set(name, strVal);
assertNotNull(result);
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals(": \n", result.toString());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testClearTest1()
throws Exception {
MultiMap mmap = newMultiMap();
MultiMap result = mmap.clear();
assertNotNull(result);
assertTrue(result.isEmpty());
assertEquals(0, result.size());
assertEquals("", result.toString());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testSetTest5()
throws Exception {
MultiMap mmap = newMultiMap();
MultiMap headers = newMultiMap();
MultiMap result = mmap.setAll(headers);
assertNotNull(result);
assertTrue(result.isEmpty());
assertEquals(0, result.size());
assertEquals("", result.toString());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testRemoveTest3()
throws Exception {
MultiMap mmap = newMultiMap();
String name = "name";
MultiMap result = mmap.remove(name);
assertNotNull(result);
assertTrue(result.isEmpty());
assertEquals(0, result.size());
}
代码示例来源:origin: eclipse-vertx/vert.x
@Test
public void testRemoveTest2()
throws Exception {
MultiMap mmap = newMultiMap();
String name = "1";
MultiMap result = mmap.remove(name);
assertNotNull(result);
assertTrue(result.isEmpty());
assertEquals(0, result.size());
}
内容来源于网络,如有侵权,请联系作者删除!