Package org.jboss.resteasy.client

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


   @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

   @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

    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

    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.