MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / toUrlSafe

Method toUrlSafe

src/test/java/org/htmlunit/util/UrlUtilsTest.java:40–53  ·  view source on GitHub ↗

@throws Exception if the test fails

()

Source from the content-addressed store, hash-verified

38 * @throws Exception if the test fails
39 */
40 @Test
41 public void toUrlSafe() throws Exception {
42 URL url = UrlUtils.toUrlSafe("http://my.home.com/index.html?query#ref");
43 assertEquals("http://my.home.com/index.html?query#ref", url.toExternalForm());
44
45 url = UrlUtils.toUrlSafe("about:blank");
46 assertEquals(UrlUtils.URL_ABOUT_BLANK, url);
47
48 url = UrlUtils.toUrlSafe("about:Blank");
49 assertEquals(UrlUtils.URL_ABOUT_BLANK, url);
50
51 url = UrlUtils.toUrlSafe("about:config");
52 assertEquals("about:config", url.toExternalForm());
53 }
54
55 /**
56 * @throws Exception if the test fails

Callers

nothing calls this directly

Calls 2

toUrlSafeMethod · 0.95
assertEqualsMethod · 0.45

Tested by

no test coverage detected