FileDocCategorySizeDatePackage
URITest.javaAPI DocAndroid 1.5 API1849Wed May 06 22:42:02 BST 2009android.core

URITest

public class URITest extends TestCase

Fields Summary
Constructors Summary
Methods Summary
private static voidconstruct(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 voidresolve(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 voidtestConstruct()

        construct("http://www.google.com/this/is-the/path?query#fragment",
                "www.google.com", "/this/is-the/path", true);
    
public voidtestResolve()

        resolve("http://www.google.com/your",
                "mom",
                "http://www.google.com/mom");