public void testChildPageAdded() throws Exception { importer.enterChildPage(pageOne, Clock.currentDate()); importer.enterChildPage(childPageOne, Clock.currentDate()); PageData data = childPageOne.getData(); assertEquals("child one", data.getContent()); }
public void testExiting() throws Exception { importer.enterChildPage(pageOne, Clock.currentDate()); importer.enterChildPage(childPageOne, Clock.currentDate()); importer.exitPage(); importer.exitPage(); importer.enterChildPage(pageTwo, Clock.currentDate()); PageData data = pageTwo.getData(); assertEquals("page two", data.getContent()); }
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 testEnterChildPageWhenRemotePageNotModified() throws Exception { importer.enterChildPage(pageOne, Clock.currentDate()); importer.exitPage(); PageData data = pageOne.getData(); data.setContent("new content"); pageOne.commit(data); importer.enterChildPage(pageOne, new Date(0)); assertEquals("new content", pageOne.getData().getContent()); }
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()); }
protected VersionInfo makeVersion() { return new VersionInfo("abc", "Jon", Clock.currentDate()); }