Package fitnesse

Examples of fitnesse.FitNesseContext


  @Test
  public void testResponseWhenNonexistentPageRequestsed() throws Exception {
    request.setResource("NonExistentPage");
    request.addInput("nonExistent", true);

    FitNesseContext context = FitNesseUtil.makeTestContext(root);
    SimpleResponse response = (SimpleResponse) responder.makeResponse(context, request);
    assertEquals(200, response.getStatus());

    String body = response.getContent();
    assertSubString("<html>", body);
View Full Code Here


  private HtmlPage page;
  private String html;

  @Before
  public void setUp() throws Exception {
    FitNesseContext context = FitNesseUtil.makeTestContext(null);
    page = new HtmlPage(context.pageFactory.getVelocityEngine(), "skeleton.vm", "fitnesse_theme", "/");
    html = page.html();
  }
View Full Code Here

  private VariableSource variableSource = null;

  @Before
  public void setUp() throws Exception {
    clock = new DateAlteringClock(new Date()).freeze();
    FitNesseContext context = FitNesseUtil.makeTestContext();
    WikiPage root = InMemoryPage.makeRoot("RooT");
    CompositeExecutionLog log = new CompositeExecutionLog(root);
    formatter = new SuiteHtmlFormatter(context, root, log) {
      @Override
      protected void writeData(String output) {
View Full Code Here

  private String oldVersion;
  private SimpleResponse response;

  private void makeTestResponse(String pageName) throws Exception {
    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");
View Full Code Here

    assertEquals(303, response.getStatus());
    assertEquals("/PageTwo", response.getHeader("Location"));
  }

  private Response getResponse() throws Exception {
    FitNesseContext context = FitNesseUtil.makeTestContext(testData.localRoot);
    MockRequest request = new MockRequest();
    request.setResource("PageTwo");
    return responder.makeResponse(context, request);
  }
View Full Code Here

public class StopFitnesseTask extends Task {
  private int fitnessePort = 8082;

  @Override
  public void execute() throws BuildException {
    FitNesseContext context = FitNesseUtil.makeTestContext(null, null, null, fitnessePort);
    try {
      new FitNesse(context).stop();
      log("Sucessfully stoped Fitnesse on port " + fitnessePort);
    }
    catch (Exception e) {
View Full Code Here

  public void setUp() throws Exception {
    testData = new WikiImporterTest();
    testData.createRemoteRoot();
    testData.createLocalRoot();

    FitNesseContext context = FitNesseUtil.makeTestContext(testData.remoteRoot, new OneUserAuthenticator("joe", "blow"));

    FitNesseUtil.startFitnesseWithContext(context);
    baseUrl = FitNesseUtil.URL;

    createResponder();
View Full Code Here

  }

  @Test
  public void negotiationErrorScreenForFailureToComplete() throws Exception {
    WikiPage root = InMemoryPage.makeRoot("RooT");
    FitNesseContext context = FitNesseUtil.makeTestContext(root);
    Responder responder = new NegotiateAuthenticator.UnauthenticatedNegotiateResponder("token");
    Request request = new MockRequest();
    SimpleResponse response = (SimpleResponse) responder.makeResponse(context, request);
    assertEquals("Negotiate token", response.getHeader("WWW-Authenticate"));
    String content = response.getContent();
View Full Code Here

  }

  @Test
  public void negotiationErrorScreenForNeedingAuthentication() throws Exception {
    WikiPage root = InMemoryPage.makeRoot("RooT");
    FitNesseContext context = FitNesseUtil.makeTestContext(root);
    Responder responder = new NegotiateAuthenticator.UnauthenticatedNegotiateResponder("token");
    SimpleResponse response = (SimpleResponse) responder.makeResponse(context, null);
    String content = response.getContent();
    assertSubString("This request requires authentication", content);
  }
View Full Code Here

    if (contextConfigurator.get(COMMAND) != null) {
      contextConfigurator.withTestSystemListener(exitCodeListener);
    }

    FitNesseContext context = contextConfigurator.makeFitNesseContext();

    logStartupInfo(context);

    update(context);
View Full Code Here

TOP

Related Classes of fitnesse.FitNesseContext

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.