public void testWholeTreeOrphaned() throws Exception { importer.importWiki(localRoot); remoteRoot.removeChildPage("PageOne"); importer.importWiki(localRoot); assertFalse(localRoot.hasChildPage("PageOne")); }
public void testAutoUpdatePropertySetOnRoot() throws Exception { addLocalPageWithImportProperty(localRoot, "PageOne", false); importer.parseUrl("http://localhost:" + FitNesseUtil.port + "/PageOne"); importer.setAutoUpdateSetting(true); WikiPage importedPage = localRoot.getChildPage("PageOne"); importer.importWiki(importedPage); WikiImportProperty importProp = WikiImportProperty.createFrom(importedPage.getData().getProperties()); assertTrue(importProp.isAutoUpdate()); importer.setAutoUpdateSetting(false); importer.importWiki(importedPage); importProp = WikiImportProperty.createFrom(importedPage.getData().getProperties()); assertFalse(importProp.isAutoUpdate()); }
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 testImportingWiki() throws Exception { localRoot = InMemoryPage.makeRoot("LocalRoot"); importer.importWiki(localRoot); assertEquals(2, localRoot.getChildren().size()); assertEquals(3, imports.size()); assertEquals(0, errors.size()); }
private void performImportWithExtraLocalPages() throws Exception { addLocalPageWithImportProperty(localRoot, "PageThree", false); addLocalPageWithImportProperty(pageOne, "ChildTwo", false); addLocalPageWithImportProperty(childPageOne, "GrandChildOne", false); localRoot.addChildPage("PageThatDoesntImport"); addLocalPageWithImportProperty(localRoot, "OtherImportRoot", true); importer.importWiki(localRoot); }