public void testAutoUpdate_NewPage() throws Exception { importer.setAutoUpdateSetting(true); importer.enterChildPage(pageOne, Clock.currentDate()); WikiImportProperty importProps = WikiImportProperty.createFrom(pageOne.getData().getProperties()); assertTrue(importProps.isAutoUpdate()); }
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()); }
private void makeImportUpdateForm(WikiImportProperty importProps) { if (importProps.isRoot()) { html.put("makeImportRootForm", true); } else { html.put("makeImportSubpageForm", true); } if (importProps.isAutoUpdate()) html.put("autoUpdate", true); html.put("sourceUrl", importProps.getSourceUrl()); }
public void testAutoUpdateWhenRemotePageNotModified() throws Exception { importer.enterChildPage(pageOne, Clock.currentDate()); importer.exitPage(); PageData data = pageOne.getData(); data.setContent("new content"); pageOne.commit(data); importer.setAutoUpdateSetting(true); importer.enterChildPage(pageOne, new Date(0)); WikiImportProperty importProps = WikiImportProperty.createFrom(pageOne.getData().getProperties()); assertTrue(importProps.isAutoUpdate()); }