Examples of parseAsString()


Examples of com.google.api.client.http.HttpResponse.parseAsString()

   public void should_DeleteStubbedRequest_WhenSuccessfulDeleteMade_ToAdminPortalRootWithValidIndexURI() throws Exception {

      final String requestUrl = String.format("%s%s", ADMIN_URL, "/2");
      HttpRequest httpGetRequest = HttpUtils.constructHttpRequest(HttpMethods.GET, requestUrl);
      HttpResponse httpGetResponse = httpGetRequest.execute();
      String getResponseContent = httpGetResponse.parseAsString().trim();

      assertThat(HttpStatus.OK_200).isEqualTo(httpGetResponse.getStatusCode());
      assertThat(getResponseContent).containsOnlyOnce("request");
      assertThat(getResponseContent).containsOnlyOnce("url: ^/[a-z]{3}-[a-z]{3}/[0-9]{2}/[A-Z]{2}/[a-z0-9]+\\?paramOne=[a-zA-Z]{3,8}&paramTwo=[a-zA-Z]{3,8}");
      assertThat(getResponseContent).containsOnlyOnce("response");
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.