Package fitnesse.http

Examples of fitnesse.http.Response.makeHttpHeaders()


    WikiPageUtil.addPage(root, PathParser.parse("ChildPage"));
    prepareRequest("ChildPage");

    Response response = responder.makeResponse(FitNesseUtil.makeTestContext(root), request);
    assertEquals(303, response.getStatus());
    assertHasRegexp("Location: /ChildPage", response.makeHttpHeaders());

    String newContent = root.getChildPage("ChildPage").getData().getContent();
    assertEquals("some new content", newContent);

    checkRecentChanges(root, "ChildPage");
View Full Code Here


    prepareRequest("ChildPage");
    request.addInput("redirect", "http://fitnesse.org:8080/SomePage");

    Response response = responder.makeResponse(FitNesseUtil.makeTestContext(root), request);
    assertEquals(303, response.getStatus());
    assertHasRegexp("Location: http://fitnesse.org:8080/SomePage", response.makeHttpHeaders());
  }

  private void checkRecentChanges(WikiPage source, String changedPage) throws Exception {
    assertTrue("RecentChanges should exist", source.hasChildPage("RecentChanges"));
    String recentChanges = source.getChildPage("RecentChanges").getData().getContent();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.