Examples of queryParameter()


Examples of org.jboss.resteasy.client.ClientRequest.queryParameter()

      request.body("text/plain", "hello world");
      Assert.assertEquals("hello world", request.postTarget(String.class));

      request = new ClientRequest("/foo", executor);
      request.header("a", "hello");
      request.queryParameter("b", "world");
      Assert.assertEquals("hello world", request.getTarget(String.class));

   }
}
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.queryParameter()

         Assert.assertEquals(204, response.getStatus());
      }

      {
         ClientRequest request = new ClientRequest(generateURL("/locating/queryParam"));
         request.queryParameter("param", "hello world");
         ClientResponse<String> response = request.get(String.class);
         Assert.assertEquals(HttpServletResponse.SC_OK, response.getStatus());
         Assert.assertEquals("hello world", response.getEntity());
      }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.queryParameter()

  
   @Test
   public void testInvalidParam() throws Exception
   {
      ClientRequest request = new ClientRequest("http://localhost:8080/RESTEASY-923/test/resource");
      request.queryParameter("param", "abc");
      ClientResponse<?> response = request.get();
      String answer = response.getEntity(String.class);
      System.out.println("status: " + response.getStatus());
      System.out.println("entity: " + answer);
      assertEquals(400, response.getStatus());
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.queryParameter()

  
   @Test
   public void testInvalidParam() throws Exception
   {
      ClientRequest request = new ClientRequest("http://localhost:8080/RESTEASY-923/test/resource");
      request.queryParameter("param", "abc");
      ClientResponse<?> response = request.get();
      String answer = response.getEntity(String.class);
      System.out.println("status: " + response.getStatus());
      System.out.println("entity: " + answer);
      assertEquals(400, response.getStatus());
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.queryParameter()

   @Test
   public void testDup() throws Exception
   {
      ClientRequest request = new ClientRequest(generateURL("/test"));
      request.queryParameter("h", "world");
      String val = request.getTarget(String.class);
      Assert.assertEquals(val, "world");

      request = new ClientRequest(generateURL("/test"));
      val = request.getTarget(String.class);
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.queryParameter()

   @Test
   public void testProxiedSubresource() throws Exception
   {
      ClientRequest request = new ClientRequest(generateURL("/proxy/3"));
      ClientResponse res = request.queryParameter("foo", "1.2").queryParameter("foo", "1.3").get();
      Assert.assertEquals(200, res.getStatus());

   }

   @Test
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.queryParameter()

    public void signalBeforeTest() {
        ClientRequest clientRequest =
                new ClientRequest(getRestEndpointUrl() + "test/remote/signal/before");
        clientRequest.header("X-Auth-Token", ADMIN_KEY);
        try {
            clientRequest.queryParameter("c", this.getClass().getName()).post();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest.queryParameter()

    public void signalAfterTest() {
        ClientRequest clientRequest =
                new ClientRequest(getRestEndpointUrl() + "test/remote/signal/after");
        clientRequest.header("X-Auth-Token", ADMIN_KEY);
        try {
            clientRequest.queryParameter("c", this.getClass().getName()).post();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
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.