Package no.priv.garshol.duke

Examples of no.priv.garshol.duke.LinkDatabase


    File linkfile = tmpdir.newFile();
    Result r = duke("--showmatches --linkfile=\"" + linkfile.getAbsolutePath() +
                   "\" doc/example-data/countries.xml");

    int outmatches = r.countOccurrences("MATCH 0.");
    LinkDatabase db = LinkDatabaseUtils.loadTestFile(linkfile.getAbsolutePath());
    assertEquals("disagreement on number of matches",
                 outmatches, db.getAllLinks().size());
  }
View Full Code Here


  /**
   * Loads a test file into an in-memory link database.
   */
  public static LinkDatabase loadTestFile(String testfile) throws IOException {
    LinkDatabase linkdb = new InMemoryLinkDatabase();
    loadTestFile(testfile, linkdb);
    return linkdb;
  }
View Full Code Here

  /**
   * Loads a test file into an in-memory link database.
   * @since 1.2
   */
  public static LinkDatabase loadTestFile(Reader reader) throws IOException {
    LinkDatabase linkdb = new InMemoryLinkDatabase();
    loadTestFile(reader, linkdb);
    return linkdb;
  }
View Full Code Here

TOP

Related Classes of no.priv.garshol.duke.LinkDatabase

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.