Examples of makeResponse()


Examples of fitnesse.Responder.makeResponse()

    return getObject(root, request);
  }

  private Object getObject(WikiPage root, MockRequest request) throws Exception {
    Responder responder = new SerializedPageResponder();
    SimpleResponse response = (SimpleResponse) responder.makeResponse(FitNesseUtil.makeTestContext(root), request);

    ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(response.getContentBytes()));
    return ois.readObject();
  }
View Full Code Here

Examples of fitnesse.Responder.makeResponse()

    WikiPageUtil.addPage(root, PathParser.parse("PageTwo"), "");

    request.setResource("root");
    request.addInput("type", "pages");
    Responder responder = new SerializedPageResponder();
    SimpleResponse response = (SimpleResponse) responder.makeResponse(FitNesseUtil.makeTestContext(root), request);
    String xml = response.getContent();

    assertEquals("text/xml", response.getContentType());
    assertSubString("<name>PageOne</name>", xml);
    assertSubString("<name>PageTwo</name>", xml);
View Full Code Here

Examples of fitnesse.Responder.makeResponse()

    pageOne.commit(data);

    request.setResource("root");
    request.addInput("type", "pages");
    Responder responder = new SerializedPageResponder();
    SimpleResponse response = (SimpleResponse) responder.makeResponse(FitNesseUtil.makeTestContext(root), request);
    String xml = response.getContent();

    assertEquals("text/xml", response.getContentType());
    assertSubString("<name>PageOne</name>", xml);
    assertSubString("<name>PageTwo</name>", xml);
View Full Code Here

Examples of fitnesse.Responder.makeResponse()

    WikiPageUtil.addPage(root, PathParser.parse("TestPageOne"), "test page");

    request.setResource("TestPageOne");
    request.addInput("type", "data");
    Responder responder = new SerializedPageResponder();
    SimpleResponse response = (SimpleResponse) responder.makeResponse(FitNesseUtil.makeTestContext(root), request);
    String xml = response.getContent();

    assertEquals("text/xml", response.getContentType());
    assertSubString("test page", xml);
    assertSubString("<Test", xml);
View Full Code Here

Examples of fitnesse.Responder.makeResponse()

  @Test
  public void testContentOfPage() throws Exception {
    request.setResource("Blah");
    Responder responder = new UnauthorizedResponder();
    SimpleResponse response = (SimpleResponse) responder.makeResponse(context, request);
    String content = response.getContent();

    assertSubString("Blah", content);
  }
View Full Code Here

Examples of fitnesse.Responder.makeResponse()

  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();
    assertSubString("Negotiated authentication required", content);
    assertSubString("Your client failed to complete required authentication", content);
  }
View Full Code Here

Examples of fitnesse.Responder.makeResponse()

  @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);
  }

  @Test
View Full Code Here

Examples of fitnesse.Responder.makeResponse()

        context.rootDirectoryName = FITNESSE_ROOT_PAGE;
        context.rootPath = SRC;
        context.doNotChunk = true;
        context.setRootPagePath();
        VelocityFactory.makeVelocityFactory(context);
        Response response = responder.makeResponse(context, request);
        final StringBuffer sb = new StringBuffer();
        ResponseSender sender = new ResponseSender() {

            @Override
            public void send(byte[] bytes) {
View Full Code Here

Examples of fitnesse.responders.search.SearchFormResponder.makeResponse()

  @Before
  public void setUp() throws Exception {
    WikiPage root = InMemoryPage.makeRoot("RooT");
    FitNesseContext context = FitNesseUtil.makeTestContext(root);
    SearchFormResponder responder = new SearchFormResponder();
    SimpleResponse response = (SimpleResponse) responder.makeResponse(context, new MockRequest());
    content = response.getContent();
  }

  public void testFocusOnSearchBox() throws Exception {
    assertSubString("onload=\"document.forms[0].searchString.focus()\"", content);
View Full Code Here

Examples of jifx.transactionManager.interfaces.IResponseMaker.makeResponse()

          commited = true;
        } else
          rollback();
      }
      // Envio la respuesta.
      iMessage = iResponseMaker.makeResponse(ctx, commited);
      if (logger.isDebugEnabled() && iMessage != null){
        logger.debug(transName+"|Mensaje de respuesta: |" + iMessage);
      }
      // enviar el mensaje a la cola de Response
      if (iMessage != null) {
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.