Exemplo n.º 1
0
  /**
   * Made this static so that following tests don't run if assumption fails. (With AT_Before, tests
   * also would not be executed but marked as passed) This could be changed back as soon as JUnit
   * ignored tests after failed assumptions
   */
  @BeforeClass
  public static void setupWikipedia() {
    DatabaseConfiguration db = new DatabaseConfiguration();
    db.setDatabase("wikiapi_test");
    db.setHost("bender.ukp.informatik.tu-darmstadt.de");
    db.setUser("student");
    db.setPassword("student");
    db.setLanguage(Language._test);
    try {
      wiki = new Wikipedia(db);
    } catch (Exception e) {
      assumeNoException(e);
      // fail("Wikipedia could not be initialized.");
    }

    try {
      catGraph = CategoryGraphManager.getCategoryGraph(wiki, false);
    } catch (WikiApiException e) {
      fail("CategoryGraph could not be initialized.");
    }
  }