コード例 #1
0
 private void addImportPropertyToPage(WikiPage page, boolean isRoot, boolean autoUpdate)
     throws Exception {
   PageData data = page.getData();
   String sourceUrl = FitNesseUtil.URL + "PageOne";
   WikiImportProperty importProps = new WikiImportProperty(sourceUrl);
   importProps.setRoot(isRoot);
   importProps.setAutoUpdate(autoUpdate);
   importProps.addTo(data.getProperties());
   pageOne.commit(data);
 }
コード例 #2
0
  @Test
  public void testImportedPageIndication() throws Exception {
    final WikiPage page = WikiPageUtil.addPage(root, PathParser.parse("SamplePage"));
    final PageData data = page.getData();
    final WikiImportProperty importProperty = new WikiImportProperty("blah");
    importProperty.addTo(data.getProperties());
    page.commit(data);

    final String content = requestPage("SamplePage").getContent();

    assertSubString("<body class=\"imported\">", content);
  }
コード例 #3
0
  private WikiPage addLocalPageWithImportProperty(
      WikiPage parentPage, String pageName, boolean isRoot) throws Exception {
    WikiPage page = parentPage.addChildPage(pageName);
    PageData data = page.getData();

    WikiPagePath pagePath = localRoot.getPageCrawler().getFullPath(page);
    WikiImportProperty importProps =
        new WikiImportProperty(
            "http://localhost:" + FitNesseUtil.port + "/" + PathParser.render(pagePath));
    if (isRoot) importProps.setRoot(true);
    importProps.addTo(data.getProperties());
    page.commit(data);

    return page;
  }