requester.password = password;
return requestPage(uri);
}
public int requestPageSaveWithContentsByUserAndPassword(String pageName, String contents, String username, String password) throws Exception {
MockRequest request = new MockRequest();
if (username != null)
request.setCredentials(username, password);
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);