Examples of bodyText()


Examples of jodd.http.HttpResponse.bodyText()

  }

  @Test
  public void testHelloReqReqAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/hello.reqreq.html?hey=YOU").body("Jodd").send();
    assertEquals("Hello YOU GET Jodd", response.bodyText().trim());
  }

  @Test
  public void testHelloNoJspAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/nohello.nojsp.html").send();
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

  @Test
  public void testHelloNoJspAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/nohello.nojsp.html").send();
    assertEquals(404, response.statusCode());
    assertTrue(response.bodyText().contains("/nohello.nojsp.html"));
  }

  @Test
  public void testChain() {
    HttpResponse response = HttpRequest.get("localhost:8173/hello.chain.html?chain=7").send();
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

  }

  @Test
  public void testChain() {
    HttpResponse response = HttpRequest.get("localhost:8173/hello.chain.html?chain=7").send();
    assertEquals("chain:9", response.bodyText().trim());
  }

  @Test
  public void testMany() {
    HttpResponse response = HttpRequest.get(
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

        "1 Bbb-2\n" +
        "2 Ccc-3\n" +
        "0 Aaa-1\n" +
        "1 Bbb-2\n" +
        "2 Ccc-3\n" +
        "{0=Person{name='Aaa', data=1}, 1=Person{name='Bbb', data=2}, 2=Person{name='Ccc', data=3}}", response.bodyText().trim());
  }

  @Test
  public void testBackBack() {
    HttpResponse response = HttpRequest.get("localhost:8173/hello.backback.html").send();
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

  }

  @Test
  public void testBackBack() {
    HttpResponse response = HttpRequest.get("localhost:8173/hello.backback.html").send();
    assertEquals("default.big", response.bodyText().trim());
  }

}
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

  @Test
  public void testArgs() {
    HttpResponse response;
    response = HttpRequest.get("localhost:8173/args.hello.html?id=1").send();

    assertEquals("+ mad 1voc + jodd 1", response.bodyText().trim());
  }

  @Test
  public void testArgs2() {
    ArgsAction.User.counter = 0;
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

  @Test
  public void testAsync() {
    HttpResponse response;
    response = HttpRequest.get("localhost:8173/async.html").send();

    assertEquals("async TASK!", response.bodyText().trim());
  }

}
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

  @Test
  public void testForwardTo() {
    HttpResponse response;

    response = HttpRequest.get("localhost:8173/alpha.html").send();
    assertEquals("alpha.jsp", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/alpha.hello.html").send();
    assertEquals("alpha.hello.jsp", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/alpha.ciao.html").send();
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

    response = HttpRequest.get("localhost:8173/alpha.html").send();
    assertEquals("alpha.jsp", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/alpha.hello.html").send();
    assertEquals("alpha.hello.jsp", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/alpha.ciao.html").send();
    assertEquals("alpha.hello.jsp", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/alpha.ciao2.html").send();
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

    response = HttpRequest.get("localhost:8173/alpha.hello.html").send();
    assertEquals("alpha.hello.jsp", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/alpha.ciao.html").send();
    assertEquals("alpha.hello.jsp", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/alpha.ciao2.html").send();
    assertEquals("alpha.hello.jsp", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/alpha.hola.html").send();
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.