Package io.vertx.core.http

Examples of io.vertx.core.http.CaseInsensitiveHeaders


  }

  @Test
  public void testAddTest12()
      throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    String name = "a";
    String strVal = "b";

    assertEquals("a: b\n", mmap.add(name, strVal).toString());
  }
View Full Code Here


  }

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

    assertEquals("aaa: \n", mmap.add(name, strVal).toString());
  }
View Full Code Here

  }

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

    assertEquals(": aaa\n", mmap.add(name, strVal).toString());
  }
View Full Code Here

  }

  @Test
  public void testAddIterable()
      throws Exception {
    MultiMap mmap = new CaseInsensitiveHeaders();
    String name = "name";
    List<String> values = new ArrayList<String>();
    values.add("value1");
    values.add("value2");

    MultiMap result = mmap.add(name, values);

    assertEquals(1, result.size());
    assertEquals("name: value1\nname: value2\n", result.toString());
  }
View Full Code Here

  }

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

    MultiMap mm = new CaseInsensitiveHeaders();
    mm.add("Header1", "value1");
    mm.add("Header2", "value2");

    MultiMap result = mmap.addAll(mm);

    assertEquals(2, result.size());
    assertEquals("Header1: value1\nHeader2: value2\n", result.toString());
View Full Code Here

  }

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

    MultiMap result = mmap.clear();

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

  }

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

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

  }

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

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

  }

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

    boolean result = mmap.contains(name);

    assertFalse(result);
    mmap.add(name, "");
    result = mmap.contains(name);
    assertTrue(result);
  }
View Full Code Here

  }

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

    List<Map.Entry<String, String>> result = mmap.entries();

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

TOP

Related Classes of io.vertx.core.http.CaseInsensitiveHeaders

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.