Package io.vertx.core

Examples of io.vertx.core.MultiMap


  }

  @Test
  public void testNamesTest1()
      throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();

    Set<String> result = mmap.names();

    assertNotNull(result);
    assertEquals(0, result.size());
  }
View Full Code Here


  }

  @Test
  public void testRemoveTest1()
      throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    CharSequence name = String.valueOf(new Object());

    MultiMap result = mmap.remove(name);

    assertNotNull(result);
    assertTrue(result.isEmpty());
    assertEquals(0, result.size());
  }
View Full Code Here

  }

  @Test
  public void testRemoveTest2()
      throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    String name = "1";

    MultiMap result = mmap.remove(name);

    assertNotNull(result);
    assertTrue(result.isEmpty());
    assertEquals(0, result.size());
  }
View Full Code Here

  }

  @Test
  public void testRemoveTest3()
      throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    String name = "name";

    MultiMap result = mmap.remove(name);

    assertNotNull(result);
    assertTrue(result.isEmpty());
    assertEquals(0, result.size());
  }
View Full Code Here

  }

  @Test
  public void testRemoveTest4()
      throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    String name = "name";
    String value = "value";
    mmap.add(name, value);

    assertTrue(mmap.contains(name));

    MultiMap result = mmap.remove(name);

    assertFalse(result.contains(name));
  }
View Full Code Here

  }

  @Test
  public void testSetTest1()
      throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    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());
  }
View Full Code Here

  }

  @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());
  }
View Full Code Here

  }

  @Test
  public void testSetTest3()
      throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    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());
  }
View Full Code Here

  }

  @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());
  }
View Full Code Here

  }

  @Test
  public void testSetTest5()
      throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    MultiMap headers = new CaseInsensitiveHeaders();

    MultiMap result = mmap.setAll(headers);

    assertNotNull(result);
    assertTrue(result.isEmpty());
    assertEquals(0, result.size());
    assertEquals("", result.toString());
  }
View Full Code Here

TOP

Related Classes of io.vertx.core.MultiMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.