Ejemplo n.º 1
0
  public void testContextIsNotOrphanWhenUpdatingNonRoot() throws Exception {
    addLocalPageWithImportProperty(localRoot, "PageOne", false);
    importer.parseUrl("http://localhost:" + FitNesseUtil.port + "/PageOne");

    importer.importWiki(localRoot.getChildPage("PageOne"));

    assertEquals(0, importer.getOrphans().size());
  }
Ejemplo n.º 2
0
  public void testFindsOrphansOnLocalWiki() throws Exception {
    performImportWithExtraLocalPages();

    List<WikiPagePath> orphans = importer.getOrphans();
    assertEquals(3, orphans.size());
    assertTrue(orphans.contains(new WikiPagePath().addNameToEnd("PageThree")));
    assertTrue(
        orphans.contains(new WikiPagePath().addNameToEnd("PageOne").addNameToEnd("ChildTwo")));
    assertTrue(
        orphans.contains(
            new WikiPagePath()
                .addNameToEnd("PageOne")
                .addNameToEnd("ChildOne")
                .addNameToEnd("GrandChildOne")));
    assertFalse(orphans.contains(new WikiPagePath().addNameToEnd("PageThatDoesntImport")));
    assertFalse(orphans.contains(new WikiPagePath().addNameToEnd("OtherImportRoot")));
  }