Package fitnesse.wiki

Examples of fitnesse.wiki.PageData


  @Before
  public void setUp() throws Exception {
    root = InMemoryPage.makeRoot("RooT");
    page = WikiPageUtil.addPage(root, PathParser.parse("PageOne"), "some content");
    PageData data = page.getData();
    WikiPageProperties properties = data.getProperties();
    properties.set(PageData.PropertySUITES,"Page One tags");
    page.commit(data);
    FitNesseUtil.makeTestContext(root);
  }
View Full Code Here


    assertEquals(SymbolicPage.class, symLink.getClass());
  }

  @Test
  public void testRemoval() throws Exception {
    PageData data = pageOne.getData();
    WikiPageProperty symLinks = data.getProperties().set(SymbolicPage.PROPERTY_NAME);
    symLinks.set("SymLink", "PageTwo");
    pageOne.commit(data);
    assertNotNull(pageOne.getChildPage("SymLink"));

    request.addInput("removal", "SymLink");
View Full Code Here

    String content = ((SimpleResponse) response).getContent();
    assertSubString("WikiWord", content);
  }

  private void prepareSymlinkOnPageOne() {
    PageData data = pageOne.getData();
    WikiPageProperty symLinks = data.getProperties().set(SymbolicPage.PROPERTY_NAME);
    symLinks.set("SymLink", "PageTwo");
    pageOne.commit(data);
    assertNotNull(pageOne.getChildPage("SymLink"));

    request.addInput("rename", "SymLink");
View Full Code Here

        WikiPage pageOne = WikiPageUtil.addPage(root, PathParser.parse("PageOne"), "page one");
        WikiPage pageOneChild = WikiPageUtil.addPage(pageOne, PathParser.parse("PageOne.PageOneChild"), "page one child");

        // Make Symbolic Link at root that links to PageOne.PageOneChild.
        SymbolicPage symPage = new SymbolicPage("SymPage", pageOneChild, root);
        PageData data = root.getData();
        data.getProperties().set(SymbolicPage.PROPERTY_NAME).set("SymPage", "PageOne.PageOneChild");
        root.commit(data);

        WikiSourcePage rootPage = new WikiSourcePage(root);
        WikiSourcePage symWikiPage = new WikiSourcePage(symPage);
View Full Code Here

        assertEquals("<li>" + HtmlElement.endl + "\t" + result + HtmlElement.endl + "</li>" + HtmlElement.endl,
                builder.buildItem(new WikiSourcePage(withProperties(new TestRoot().makePage(page), properties))).html());
    }

    private WikiPage withProperties(WikiPage page, String[] propList) throws Exception {
        PageData data = page.getData();
        WikiPageProperties props = data.getProperties();
        for (String aPropList : propList) {
            String[] parts = aPropList.split("=");
            if (parts.length == 1) props.set(parts[0]);
            else props.set(parts[0], parts[1]);
        }
View Full Code Here

  public void translatesHelp() throws Exception {
    TestRoot root = new TestRoot();
    WikiPage includingPage = root.makePage("PageOne", "!include -h PageTwo");
   
    WikiPage pageWithHelp = root.makePage("PageTwo", "two");
    PageData pageData = pageWithHelp.getData();
    pageData.setAttribute(PageData.PropertyHELP, "help me");
    pageWithHelp.commit(pageData);

    ParserTestHelper.assertTranslatesTo(includingPage, "help me");
  }
View Full Code Here

    return sender.sentData();
  }

  private MockRequest setupRequest() throws Exception {
    WikiPage page = WikiPageUtil.addPage(root, PathParser.parse("PageOne"));
    PageData data = page.getData();
    data.setContent("some content");
    WikiPageProperties properties = data.getProperties();
    properties.set(TEST.toString(), "true");
    properties.set("Suites", "filter1,filter2");
    page.commit(data);

    MockRequest request = new MockRequest();
View Full Code Here

    assertSubString("No pages", content);
  }

  private MockRequest setupRequestForObsoletePage() throws Exception {
    WikiPage page = WikiPageUtil.addPage(root, PathParser.parse("ObsoletePage"));
    PageData data = page.getData();
    data.setContent("some content");
    WikiPageProperties properties1 = data.getProperties();
    properties1.set(TEST.toString(), "true");
    properties1.set("Suites", "filter1,filter2");
    WikiPageProperties properties = properties1;
    properties.set(PropertyPRUNE, "true");
    page.commit(data);
View Full Code Here

  }

  @Test
  public void testResponse() throws Exception {
    WikiPage page = WikiPageUtil.addPage(root, PathParser.parse("PageOne"), "");
    PageData data = page.getData();
    data.setContent("some content");
    WikiPageProperties properties = data.getProperties();
    properties.set(PageData.PropertySUITES, "Page Tags");
    properties.set("Test", "true");
    page.commit(data);

    MockRequest request = new MockRequest();
View Full Code Here

  }

  @Test
  public void testJsonResponse() throws Exception {
    WikiPage page = WikiPageUtil.addPage(root, PathParser.parse("PageOne"));
    PageData data = page.getData();
    WikiPageProperties properties = data.getProperties();
    properties.set(PageType.TEST.toString(), "true");
    page.commit(data);

    MockRequest request = new MockRequest();
    request.setResource("PageOne");
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.