Code example for UnicodeEscaper

Methods: escape

0
    assertUnescaped(e, '@');
 
    // Don't use plus for spaces 
    assertEscaping(e, "%20", ' ');
 
    assertEquals("safe%20with%20spaces", e.escape("safe with spaces"));
    assertEquals("foo@bar.com", e.escape("foo@bar.com"));
  } 
 
  public void testUrlFragmentEscaper() { 
    UnicodeEscaper e = (UnicodeEscaper) urlFragmentEscaper();
    assertUnescaped(e, '+');
    assertUnescaped(e, '/');
    assertUnescaped(e, '?');
 
    assertPathEscaper(e);
  } 
}