Package fitnesse.wiki

Examples of fitnesse.wiki.WikiPageProperties


    responder.makeResponse(FitNesseUtil.makeTestContext(root), request);

    PageData dataToSave = page.getData();
    // The LasModified Attribute is the only one that might be different, so fix it here
    dataToSave.setAttribute(PropertyLAST_MODIFIED, defaultData.getAttribute(PropertyLAST_MODIFIED));
    WikiPageProperties defaultWikiPagePropertiesDefault = new WikiPageProperties(defaultData.getProperties());
    WikiPageProperties wikiPagePropertiesToSave = new WikiPageProperties(dataToSave.getProperties());
    assertEquals(defaultWikiPagePropertiesDefault.toXml(), wikiPagePropertiesToSave.toXml());
  }
View Full Code Here


  @Before
  public void setUp() throws Exception {
    root = InMemoryPage.makeRoot("RooT");
    WikiPage testPage = root.addChildPage("TestPage");
    PageData data = testPage.getData();
    WikiPageProperties properties = data.getProperties();
    properties.set(PageData.PropertySUITES, "Test Page tags");
    testPage.commit(data);
    context = FitNesseUtil.makeTestContext(root);
    log = new CompositeExecutionLog(testPage);
  }
View Full Code Here

  public void setUp() throws Exception {
    WikiPage root = InMemoryPage.makeRoot("RooT");
    page = WikiPageUtil.addPage(root, PathParser.parse("PageOne"), "original content");
    PageData data = page.getData();
    data.setContent("new stuff");
    data.setProperties(new WikiPageProperties());
    VersionInfo commitRecord = last(page.getVersions());
    page.commit(data);

    MockRequest request = new MockRequest();
    request.setResource("PageOne");
View Full Code Here

    WikiPage root = InMemoryPage.makeRoot("RooT");
    FitNesseContext context = FitNesseUtil.makeTestContext(root);
    WikiPage page = WikiPageUtil.addPage(root, PathParser.parse(pageName), "original content ${requestParam}");
    PageData data = page.getData();
   
    WikiPageProperties properties = data.getProperties();
    properties.set(PageData.PropertySUITES, "New Page tags");
    data.setContent("new stuff");
    VersionInfo commitRecord = last(page.getVersions());
    oldVersion = commitRecord.getName();
    page.commit(data);
    MockRequest request = new MockRequest();
View Full Code Here

    assertTrue(obj instanceof PageData);
    PageData data = (PageData) obj;

    assertEquals("this is page one", data.getContent());

    WikiPageProperties props = data.getProperties();
    assertTrue(props.has("Attr1"));
  }
View Full Code Here

    WikiPage pageOne = WikiPageUtil.addPage(root, PathParser.parse("PageOne"), "");
    WikiPageUtil.addPage(root, PathParser.parse("PageOne.ChildOne"), "");
    WikiPageUtil.addPage(root, PathParser.parse("PageTwo"), "");

    PageData data = pageOne.getData();
    WikiPageProperties properties = data.getProperties();
    WikiPageProperty symLinks = properties.set(SymbolicPage.PROPERTY_NAME);
    symLinks.set("SymPage", "PageTwo");
    pageOne.commit(data);

    request.setResource("root");
    request.addInput("type", "pages");
View Full Code Here

    WikiPage testPage = WikiPageUtil.addPage(suitePage, PathParser.parse("TestPage"), outputWritingTable("Output of TestPage"));
    WikiPageUtil.addPage(suitePage, PathParser.parse(PageData.SUITE_SETUP_NAME), outputWritingTable("Output of SuiteSetUp"));
    WikiPageUtil.addPage(suitePage, PathParser.parse(PageData.SUITE_TEARDOWN_NAME), outputWritingTable("Output of SuiteTearDown"));

    PageData data = testPage.getData();
    WikiPageProperties properties = data.getProperties();
    properties.set(PageData.PropertySUITES, "Test Page tags");
    testPage.commit(data);

    WikiPagePath testPagePath = testPage.getPageCrawler().getFullPath();
    String resource = PathParser.render(testPagePath);
    request.setResource(resource);
View Full Code Here

    WikiPage importedChildOne = importedPageOne.getChildPage("ChildOne");
    checkProperties(importedChildOne, baseUrl + "PageOne.ChildOne", false, testData.remoteRoot.getChildPage("PageOne").getChildPage("ChildOne"));
  }

  private void checkProperties(WikiPage page, String source, boolean isRoot, WikiPage remotePage) throws Exception {
    WikiPageProperties props = page.getData().getProperties();
    if (!isRoot)
      assertFalse("should not have Edit property", props.has("Edit"));

    WikiImportProperty importProperty = WikiImportProperty.createFrom(props);
    assertNotNull(importProperty);
    assertEquals(source, importProperty.getSourceUrl());
    assertEquals(isRoot, importProperty.isRoot());
View Full Code Here

  @Test
  public void testResponse() throws Exception {
    WikiPage page = WikiPageUtil.addPage(root, PathParser.parse("ChildPage"), "child content");
    PageData data = page.getData();
    WikiPageProperties properties = data.getProperties();
    properties.set(PageData.PropertySUITES, "Wiki Page tags");
    page.commit(data);

    final MockRequest request = new MockRequest();
    request.setResource("ChildPage");
View Full Code Here

  }

  @Test
  public void testPageContentIsUpdated() throws Exception {
    PageData data = testData.pageTwo.getData();
    WikiPageProperties props = data.getProperties();

    WikiImportProperty importProps = new WikiImportProperty("http://localhost:" + FitNesseUtil.PORT + "/PageTwo");
    importProps.addTo(props);
    testData.pageTwo.commit(data);
View Full Code Here

TOP

Related Classes of fitnesse.wiki.WikiPageProperties

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.