MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / idn

Method idn

src/test/java/org/htmlunit/WebRequestTest.java:244–251  ·  view source on GitHub ↗

@throws Exception if the test fails

()

Source from the content-addressed store, hash-verified

242 * @throws Exception if the test fails
243 */
244 @Test
245 public void idn() throws Exception {
246 final String internationalized = "\u0645\u0635\u0631";
247 final URL url = new URL("http://" + internationalized + ".com/" + internationalized);
248 final WebRequest request = new WebRequest(url);
249 final URL expected = new URL("http://xn--wgbh1c.com/" + internationalized);
250 assertEquals(expected, request.getUrl());
251 }
252
253 /**
254 * @throws Exception if the test fails

Callers

nothing calls this directly

Calls 2

getUrlMethod · 0.95
assertEqualsMethod · 0.45

Tested by

no test coverage detected