Ejemplo n.º 1
0
 @Test
 public void testToUNICODE() throws Exception {
   assertEquals("http://www.çevir.com", URLUtil.toUNICODE("http://www.xn--evir-zoa.com"));
   assertEquals("http://uni-tübingen.de/", URLUtil.toUNICODE("http://xn--uni-tbingen-xhb.de/"));
   assertEquals(
       "http://www.medizin.uni-tübingen.de:8080/search.php?q=abc#p1",
       URLUtil.toUNICODE("http://www.medizin.xn--uni-tbingen-xhb.de:8080/search.php?q=abc#p1"));
 }
Ejemplo n.º 2
0
 @Test
 public void testFileProtocol() throws Exception {
   // keep one single slash NUTCH-XXX
   assertEquals("file:/path/file.html", URLUtil.toASCII("file:/path/file.html"));
   assertEquals("file:/path/file.html", URLUtil.toUNICODE("file:/path/file.html"));
 }