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()); }
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"))); }