コード例 #1
0
  public void getSimpleConsumes() throws Exception {
    HttpTester request = makeRequest("GET", "/a/simple");
    request.addHeader("content-type", "x-sj-test");
    HttpTester response = getResponse(request);

    assertEquals(response.getStatus(), 200);
    assertEquals(response.getContent(), "Consumes");
  }
コード例 #2
0
  public void getSimpleProduces() throws Exception {
    HttpTester request = makeRequest("GET", "/a/simple");
    request.addHeader("accept", "x-sj-test,xml;");
    HttpTester response = getResponse(request);

    assertEquals(response.getStatus(), 200);
    assertEquals(response.getContent(), "Produces");
  }
コード例 #3
0
  public void getSimpleHeader() throws Exception {
    HttpTester request = makeRequest("GET", "/a/simple");
    request.addHeader("x-sj-test", "Salomon");
    HttpTester response = getResponse(request);

    assertEquals(response.getStatus(), 200);
    assertEquals(response.getContent(), "h:Salomon");
  }