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