Package org.apache.manifoldcf.crawler.connectors.webcrawler

Examples of org.apache.manifoldcf.crawler.connectors.webcrawler.WebURL


  @Test
  public void absolutePath()
    throws Exception
  {
    WebURL parent = new WebURL("http://foo.com");
    WebURL resolved = parent.resolve("http://bar.com");
    assertEquals(resolved.toASCIIString(),"http://bar.com");
  }
View Full Code Here


  @Test
  public void relativePath()
    throws Exception
  {
    WebURL parent = new WebURL("http://foo.com/abc/def.html");
    WebURL resolved = parent.resolve("/def/ghi.html");
    assertEquals(resolved.toASCIIString(),"http://foo.com/def/ghi.html");
  }
View Full Code Here

  @Test
  public void noSlashDocument()
    throws Exception
  {
    WebURL parent = new WebURL("http://foo.com");
    WebURL resolved = parent.resolve("hello.pdf");
    assertEquals(resolved.toASCIIString(),"http://foo.com/hello.pdf");
  }
View Full Code Here

  @Test
  public void relativeQuery()
    throws Exception
  {
    WebURL parent = new WebURL("http://foo.com/abc/def/ghi.asmx?q=foo");
    WebURL resolved = parent.resolve("?q=bar");
    assertEquals(resolved.toASCIIString(),"http://foo.com/abc/def/ghi.asmx?q=bar");
  }
View Full Code Here

  @Test
  public void queryEscaping()
    throws Exception
  {
    WebURL parent = new WebURL("http://foo.com/abc/def/ghi.asmx?q=foo%3Dbar");
    WebURL resolved = parent.resolve("?q=bar%3Dfoo");
    assertEquals(resolved.toASCIIString(),"http://foo.com/abc/def/ghi.asmx?q=bar%3Dfoo");
  }
View Full Code Here

TOP

Related Classes of org.apache.manifoldcf.crawler.connectors.webcrawler.WebURL

Copyright © 2018 www.massapicom. 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.