Package java.net

Examples of java.net.URI.compareTo()


  h.check(testURI.compareTo(new URI(HIER_URI)) == 0);
  h.check(testURI.compareTo(new URI("ftp://jones@example.com:98?name=Fred#1")) > 0);
  h.check(testURI.compareTo(new URI("http://jones@example.com:98?name=Fred#2")) < 0);
  h.check(testURI.compareTo(new URI("http://alice@example.com:98?name=Fred#1")) > 0);
  h.check(testURI.compareTo(new URI("http://jones@examples.com:98?name=Fred#1")) < 0);
  h.check(testURI.compareTo(new URI("http://jones@example.com:99?name=Fred#1")) < 0);
  h.check(testURI.compareTo(new URI("http://jones@example.com:98?name=Sally#1")) < 0);
  URI opaqURI = new URI(OPAQ_URI);
  h.check(opaqURI.compareTo(opaqURI) == 0);
  h.check(opaqURI.compareTo(new URI(OPAQ_URI)) == 0);
  h.check(opaqURI.compareTo(testURI) > 0);
View Full Code Here


  h.check(testURI.compareTo(new URI("ftp://jones@example.com:98?name=Fred#1")) > 0);
  h.check(testURI.compareTo(new URI("http://jones@example.com:98?name=Fred#2")) < 0);
  h.check(testURI.compareTo(new URI("http://alice@example.com:98?name=Fred#1")) > 0);
  h.check(testURI.compareTo(new URI("http://jones@examples.com:98?name=Fred#1")) < 0);
  h.check(testURI.compareTo(new URI("http://jones@example.com:99?name=Fred#1")) < 0);
  h.check(testURI.compareTo(new URI("http://jones@example.com:98?name=Sally#1")) < 0);
  URI opaqURI = new URI(OPAQ_URI);
  h.check(opaqURI.compareTo(opaqURI) == 0);
  h.check(opaqURI.compareTo(new URI(OPAQ_URI)) == 0);
  h.check(opaqURI.compareTo(testURI) > 0);
  h.check(opaqURI.compareTo(new URI("isbn:987654321#34")) < 0);
View Full Code Here

  h.check(testURI.compareTo(new URI("http://alice@example.com:98?name=Fred#1")) > 0);
  h.check(testURI.compareTo(new URI("http://jones@examples.com:98?name=Fred#1")) < 0);
  h.check(testURI.compareTo(new URI("http://jones@example.com:99?name=Fred#1")) < 0);
  h.check(testURI.compareTo(new URI("http://jones@example.com:98?name=Sally#1")) < 0);
  URI opaqURI = new URI(OPAQ_URI);
  h.check(opaqURI.compareTo(opaqURI) == 0);
  h.check(opaqURI.compareTo(new URI(OPAQ_URI)) == 0);
  h.check(opaqURI.compareTo(testURI) > 0);
  h.check(opaqURI.compareTo(new URI("isbn:987654321#34")) < 0);
  SortedSet s = new TreeSet();
  s.add(opaqURI);
View Full Code Here

  h.check(testURI.compareTo(new URI("http://jones@examples.com:98?name=Fred#1")) < 0);
  h.check(testURI.compareTo(new URI("http://jones@example.com:99?name=Fred#1")) < 0);
  h.check(testURI.compareTo(new URI("http://jones@example.com:98?name=Sally#1")) < 0);
  URI opaqURI = new URI(OPAQ_URI);
  h.check(opaqURI.compareTo(opaqURI) == 0);
  h.check(opaqURI.compareTo(new URI(OPAQ_URI)) == 0);
  h.check(opaqURI.compareTo(testURI) > 0);
  h.check(opaqURI.compareTo(new URI("isbn:987654321#34")) < 0);
  SortedSet s = new TreeSet();
  s.add(opaqURI);
  s.add(testURI);
View Full Code Here

  h.check(testURI.compareTo(new URI("http://jones@example.com:99?name=Fred#1")) < 0);
  h.check(testURI.compareTo(new URI("http://jones@example.com:98?name=Sally#1")) < 0);
  URI opaqURI = new URI(OPAQ_URI);
  h.check(opaqURI.compareTo(opaqURI) == 0);
  h.check(opaqURI.compareTo(new URI(OPAQ_URI)) == 0);
  h.check(opaqURI.compareTo(testURI) > 0);
  h.check(opaqURI.compareTo(new URI("isbn:987654321#34")) < 0);
  SortedSet s = new TreeSet();
  s.add(opaqURI);
  s.add(testURI);
  s.add(new URI("ftp://jones@example.com:98?name=Fred#1"));
View Full Code Here

  h.check(testURI.compareTo(new URI("http://jones@example.com:98?name=Sally#1")) < 0);
  URI opaqURI = new URI(OPAQ_URI);
  h.check(opaqURI.compareTo(opaqURI) == 0);
  h.check(opaqURI.compareTo(new URI(OPAQ_URI)) == 0);
  h.check(opaqURI.compareTo(testURI) > 0);
  h.check(opaqURI.compareTo(new URI("isbn:987654321#34")) < 0);
  SortedSet s = new TreeSet();
  s.add(opaqURI);
  s.add(testURI);
  s.add(new URI("ftp://jones@example.com:98?name=Fred#1"));
  s.add(new URI("http://jones@example.com:98?name=Fred#2"));
View Full Code Here

        URI uri, uri2;

        // test URIs with host names with different casing
        uri = new URI("http://AbC.cOm/root/news");
        uri2 = new URI("http://aBc.CoM/root/news");
        assertEquals("TestA", 0, uri.compareTo(uri2));
        assertEquals("TestB", 0, uri.compareTo(uri2));

        // test URIs with one undefined component
        uri = new URI("http://abc.com:80/root/news");
        uri2 = new URI("http://abc.com/root/news");
View Full Code Here

        // test URIs with host names with different casing
        uri = new URI("http://AbC.cOm/root/news");
        uri2 = new URI("http://aBc.CoM/root/news");
        assertEquals("TestA", 0, uri.compareTo(uri2));
        assertEquals("TestB", 0, uri.compareTo(uri2));

        // test URIs with one undefined component
        uri = new URI("http://abc.com:80/root/news");
        uri2 = new URI("http://abc.com/root/news");
        assertTrue("TestC", uri.compareTo(uri2) > 0);
View Full Code Here

        assertEquals("TestB", 0, uri.compareTo(uri2));

        // test URIs with one undefined component
        uri = new URI("http://abc.com:80/root/news");
        uri2 = new URI("http://abc.com/root/news");
        assertTrue("TestC", uri.compareTo(uri2) > 0);
        assertTrue("TestD", uri2.compareTo(uri) < 0);

        // test URIs with one undefined component
        uri = new URI("http://user@abc.com/root/news");
        uri2 = new URI("http://abc.com/root/news");
View Full Code Here

        assertTrue("TestD", uri2.compareTo(uri) < 0);

        // test URIs with one undefined component
        uri = new URI("http://user@abc.com/root/news");
        uri2 = new URI("http://abc.com/root/news");
        assertTrue("TestE", uri.compareTo(uri2) > 0);
        assertTrue("TestF", uri2.compareTo(uri) < 0);
    }

    /**
     * @tests java.net.URI#create(java.lang.String)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.