Package fitnesse.wiki

Examples of fitnesse.wiki.PageData


  }

  @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);
View Full Code Here


  }

  @Test
  public void testImportedPageIndicationNotOnRoot() throws Exception {
    final WikiPage page = WikiPageUtil.addPage(root, PathParser.parse("SamplePage"));
    final PageData data = page.getData();
    final WikiImportProperty importProperty = new WikiImportProperty("blah");
    importProperty.setRoot(true);
    importProperty.addTo(data.getProperties());
    page.commit(data);

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

    assertNotSubString("<body class=\"imported\">", content);
View Full Code Here

    assertEquals(tearDown, ((WikiTestPage) slimList.get(2)).getSourcePage());
  }

  private WikiPage addTestPage(WikiPage page, String name, String content) {
    WikiPage testPage = WikiPageUtil.addPage(page, PathParser.parse(name), content);
    PageData data = testPage.getData();
    data.setAttribute("Test");
    testPage.commit(data);
    return testPage;
  }
View Full Code Here

    verify(listener).close();
  }

  private WikiPage addTestPage(WikiPage page, String name, String content) {
    WikiPage testPage = WikiPageUtil.addPage(page, PathParser.parse(name), content);
    PageData data = testPage.getData();
    data.setAttribute("Test");
    testPage.commit(data);
    return testPage;
  }
View Full Code Here

  public void testPathSeparatorVariable() throws Exception {
    WikiPage page = WikiPageUtil.addPage(root, PathParser.parse("TestPage"),
            "!define PATH_SEPARATOR {|}\n" +
                    "!path fitnesse.jar\n" +
                    "!path my.jar");
    PageData data = page.getData();
    page.commit(data);

    String expected = "fitnesse.jar" + "|" + "my.jar";
    assertEquals(expected, new WikiTestPage(page, variableSource).getClassPath().toString());
  }
View Full Code Here

  public void tearDown() throws Exception {
    FitNesseUtil.stopFitnesse();
  }

  private void makeSecurePage(WikiPage page) throws Exception {
    PageData data = page.getData();
    data.setAttribute(PageData.PropertySECURE_READ);
    page.commit(data);
  }
View Full Code Here

    assertEquals(MockWikiImporter.mockContent, childTwo.getData().getContent());
    assertEquals("Updating imported content... Done.", sentMessages);
  }

  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);
  }
View Full Code Here

      + "/FrontPage.MyPage");
  }

  @Test
  public void testLinkWithSetPrefix() throws Exception {
    PageData data = root.getData();
    data.setContent("!define RSS_PREFIX {http://host/}\n");
    root.commit(data);

    NodeList items = getReportedItems("|PageName|author|" + date + "|");
    assertEquals(1, items.getLength());
    checkItem(items.item(0), "PageName", "author", rfcDate, "author:" + rfcDate, "http://host/PageName");
View Full Code Here

  @Test
  public void testEnterChildPage() throws Exception {
    importer.enterChildPage(pageOne, Clock.currentDate());

    PageData data = pageOne.getData();
    assertEquals("page one", data.getContent());
  }
View Full Code Here

  @Test
  public void testChildPageAdded() throws Exception {
    importer.enterChildPage(pageOne, Clock.currentDate());
    importer.enterChildPage(childPageOne, Clock.currentDate());

    PageData data = childPageOne.getData();
    assertEquals("child one", data.getContent());
  }
View Full Code Here

TOP

Related Classes of fitnesse.wiki.PageData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.