Package fitnesse.wiki

Examples of fitnesse.wiki.WikiPagePath


    movePage(sourcePage, destinationParent, true);
    assertTrue(crawler.pageExists(PathParser.parse(destinationPage)));
    assertFalse(crawler.pageExists(PathParser.parse(sourcePage)));

    WikiPagePath destinationPath = PathParser.parse(destinationPage);
    WikiPage movedPage = crawler.getPage(destinationPath);
    data = movedPage.getData();
    assertEquals("content", data.getContent());
    assertEquals("someValue", data.getAttribute("someAttribute"));
  }
View Full Code Here


    final String destinationPage = "PageTwo.PageA";
    final String destinationChildOne = "PageTwo.PageA.ChildOne";
    final String destinationChildTwo = "PageTwo.PageA.ChildTwo";
    final String destinationGrandChild = "PageTwo.PageA.ChildTwo.ChildTwoDotOne";

    WikiPagePath sourceChildOnePath = PathParser.parse(sourceChildOne);
    WikiPagePath sourceChildTwoPath = PathParser.parse(sourceChildTwo);
    WikiPagePath sourceGrandChildPath = PathParser.parse(sourceGrandChild);
    WikiPagePath destinationPagePath = PathParser.parse(destinationPage);
    WikiPagePath destinationChildOnePath = PathParser.parse(destinationChildOne);
    WikiPagePath destinationChildTwoPath = PathParser.parse(destinationChildTwo);
    WikiPagePath destinationGrandChildPath = PathParser.parse(destinationGrandChild);

    WikiPageUtil.addPage(root, sourceChildOnePath, "child1Content");
    WikiPageUtil.addPage(root, sourceChildTwoPath, "child2Content");
    WikiPageUtil.addPage(root, sourceGrandChildPath, "");
View Full Code Here

    assertTrue(crawler.pageExists(PathParser.parse("PageOne.PageA")));
  }

  @Test
  public void testMoveToRoot() throws Exception {
    WikiPagePath originalPath = PathParser.parse("PageOne.PageA");
    assertTrue(crawler.pageExists(originalPath));
    movePage(originalPath, PathParser.parse(""), true);
    WikiPage movedPage = root.getChildPage(pageA.getName());
    assertFalse(crawler.pageExists(originalPath));
    assertEquals("content", movedPage.getData().getContent());
View Full Code Here

    request.addInput("responder", "saveData");
    request.addInput(EditResponder.TIME_STAMP, "9999999999999");
    request.addInput(EditResponder.TICKET_ID, "321");
    request.addInput("pageContent", contents);
    request.parseRequestUri("/" + pageName);
    WikiPagePath path = PathParser.parse(request.getResource()); // uri;
    FitnesseFixtureContext.page = FitnesseFixtureContext.root.getPageCrawler().getPage(path);
    FitNesseExpediter expediter = new FitNesseExpediter(new MockSocket(""), FitnesseFixtureContext.context);
    FitnesseFixtureContext.response = expediter.createGoodResponse(request);
    FitnesseFixtureContext.sender = new MockResponseSender();
    FitnesseFixtureContext.sender.doSending(FitnesseFixtureContext.response);
View Full Code Here

    return requestPageSaveWithContentsByUserAndPassword(pageName, contents, null, null);
  }

  public String lastModifiedOfPage(String pageName) throws Exception {
    WikiPage root = FitnesseFixtureContext.root;
    WikiPagePath pagePath = PathParser.parse(pageName);
    WikiPage thePage = root.getPageCrawler().getPage(pagePath);
    PageData data = thePage.getData();
    return data.getAttribute(PageData.LAST_MODIFYING_USER);
  }
View Full Code Here

    return data.getAttribute(PageData.LAST_MODIFYING_USER);
  }

  public boolean pageIsASymbolicLink(String pageName) {
    WikiPage root = FitnesseFixtureContext.root;
    WikiPagePath pagePath = PathParser.parse(pageName);
    WikiPage thePage = root.getPageCrawler().getPage(pagePath);
    return thePage instanceof SymbolicPage;
  }
View Full Code Here

    return thePage instanceof SymbolicPage;
  }

  public boolean pageExists(String pageName) {
      WikiPage root = FitnesseFixtureContext.root;
      WikiPagePath pagePath = PathParser.parse(pageName);
      WikiPage thePage = root.getPageCrawler().getPage(pagePath);
      return thePage != null;
  }
View Full Code Here

  onPageSetAttribute(pageName, "Suite");
  }

  private void onPageSetAttribute(String pageName, String attrName) {
    WikiPage root = FitnesseFixtureContext.root;
    WikiPagePath pagePath = PathParser.parse(pageName);
    WikiPage thePage = root.getPageCrawler().getPage(pagePath);
    PageData data = thePage.getData();
    data.setAttribute(attrName, "true");
    thePage.commit(data);
  }
View Full Code Here

    if (username != null)
      request.setCredentials(username, password);

    request.parseRequestUri("/" + uri);
    WikiPagePath path = PathParser.parse(request.getResource()); // uri;
    FitnesseFixtureContext.page = FitnesseFixtureContext.root.getPageCrawler().getPage(path);
    FitNesseExpediter expediter = new FitNesseExpediter(new MockSocket(""), FitnesseFixtureContext.context);
    FitnesseFixtureContext.response = expediter.createGoodResponse(request);
    FitnesseFixtureContext.sender = new MockResponseSender();
    FitnesseFixtureContext.sender.doSending(FitnesseFixtureContext.response);
View Full Code Here

    response.setContent(html.html());
    return response;
  }

  protected void loadPage(String pageName, FitNesseContext context) {
    WikiPagePath path = PathParser.parse(pageName);
    PageCrawler crawler = context.root.getPageCrawler();
    page = crawler.getPage(path);
    if (page != null)
      pageData = page.getData();
  }
View Full Code Here

TOP

Related Classes of fitnesse.wiki.WikiPagePath

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.