Test WebClient#expandUrl(URL,String) for the case where an anchor name was specified. @throws Exception if the test fails
()
| 1098 | * @throws Exception if the test fails |
| 1099 | */ |
| 1100 | @Test |
| 1101 | public void expandUrl() throws Exception { |
| 1102 | final String prefix = URL_FIRST.toExternalForm(); |
| 1103 | assertEquals(prefix + "#second", WebClient.expandUrl(URL_FIRST, "#second")); |
| 1104 | assertEquals(prefix + "?a=1&b=2", WebClient.expandUrl(new URL(prefix + "?a=1&b=2"), "")); |
| 1105 | assertEquals(prefix + "?b=2&c=3", WebClient.expandUrl(new URL(prefix + "?a=1&b=2"), "?b=2&c=3")); |
| 1106 | assertEquals("file:/home/myself/test.js", |
| 1107 | WebClient.expandUrl(new URL("file:/home/myself/myTest.html"), "test.js")); |
| 1108 | } |
| 1109 | |
| 1110 | /** |
| 1111 | * @throws Exception if the test fails |
nothing calls this directly
no test coverage detected