URITestpublic class URITest extends TestCase
Methods Summary |
---|
private static void | construct(java.lang.String str, java.lang.String host, java.lang.String path, boolean absolute)
URI uri = new URI(str);
assertEquals(host, uri.getHost());
assertEquals(path, uri.getPath());
assertEquals(absolute, uri.isAbsolute());
| private static void | resolve(java.lang.String base, java.lang.String uri, java.lang.String expected)
URI b = URI.create(base);
URI resolved = b.resolve(uri);
// System.out.println("base=" + base + " uri=" + uri
// + " resolved=" + resolved);
assertEquals(expected, resolved.toString());
| public void | testConstruct()
construct("http://www.google.com/this/is-the/path?query#fragment",
"www.google.com", "/this/is-the/path", true);
| public void | testResolve()
resolve("http://www.google.com/your",
"mom",
"http://www.google.com/mom");
|
|