Package com.jayway.restassured.response

Examples of com.jayway.restassured.response.Response.asString()


        .pathParam("id", EXAMPLE_DEPLOYMENT_ID)
        .pathParam("resourceId", EXAMPLE_DEPLOYMENT_RESOURCE_ID)
      .then().expect().statusCode(Status.OK.getStatusCode())
      .when().get(SINGLE_RESOURCE_DATA_URL);

    String responseContent = response.asString();
    assertTrue(responseContent.contains("<?xml"));

  }

  @Test
View Full Code Here


      .statusCode(Status.OK.getStatusCode())
//      .body("id", equalTo(MockProvider.EXAMPLE_PROCESS_DEFINITION_ID))
//      .body("bpmn20Xml", startsWith("<?xml"))
    .when().get(XML_DEFINITION_URL);

    String responseContent = response.asString();
    Assert.assertTrue(responseContent.contains(MockProvider.EXAMPLE_PROCESS_DEFINITION_ID));
    Assert.assertTrue(responseContent.contains("<?xml"));
  }

  @Test
View Full Code Here

          .statusCode(Status.OK.getStatusCode())
          .contentType(XHTML_XML_CONTENT_TYPE)
      .when()
        .get(RENDERED_FORM_URL);

    String responseContent = response.asString();
    System.out.println(responseContent);
    Assertions.assertThat(responseContent).isEqualTo(expectedResult);
  }

  @Test
View Full Code Here

      .statusCode(Status.OK.getStatusCode())
//      .body("id", equalTo(MockProvider.EXAMPLE_PROCESS_DEFINITION_ID))
//      .body("bpmn20Xml", startsWith("<?xml"))
    .when().get(XML_DEFINITION_BY_KEY_URL);

    String responseContent = response.asString();
    Assert.assertTrue(responseContent.contains(MockProvider.EXAMPLE_PROCESS_DEFINITION_ID));
    Assert.assertTrue(responseContent.contains("<?xml"));
  }

  @Test
View Full Code Here

          .statusCode(Status.OK.getStatusCode())
          .contentType(XHTML_XML_CONTENT_TYPE)
      .when()
        .get(RENDERED_FORM_BY_KEY_URL);

    String responseContent = response.asString();
    Assertions.assertThat(responseContent).isEqualTo(expectedResult);
  }

  @Test
  public void testGetRenderedStartFormReturnsNotFound_ByKey() {
View Full Code Here

    // assert query invocation
    inOrder.verify(mockedQuery).deploymentNameLike(queryKey);
    inOrder.verify(mockedQuery).list();

    String content = response.asString();
    List<String> deployments = from(content).getList("");
    Assert.assertEquals("There should be one deployment returned.", 1, deployments.size());
    Assert.assertNotNull("There should be one deployment returned", deployments.get(0));

    String returnedId = from(content).getString("[0].id");
View Full Code Here

   
    InOrder inOrder = inOrder(mockQuery);
    inOrder.verify(mockQuery).userFirstName(queryFirstName);
    inOrder.verify(mockQuery).list();
   
    String content = response.asString();
    List<String> instances = from(content).getList("");
    Assert.assertEquals("There should be one user returned.", 1, instances.size());
    Assert.assertNotNull("The returned user should not be null.", instances.get(0));
   
    String returendLastName = from(content).getString("[0].lastName");
View Full Code Here

      expect().
        statusCode(201).
      when().
        post(REST_PATH + "/mailbox/label?name={labelName}");

    int labelId = with(response.asString()).getInt("id");
   
    // check added label
    expect().
      statusCode(200).and().
      body("'" + labelId + "'.name",        equalTo(labelB)).
View Full Code Here

      expect().
        statusCode(201).
      when().
        post(REST_PATH + "/mailbox/message/{messageId}");

    UUID newMessageId = UUID.fromString( with(response.asString()).getString("id") );

    // verify that message updated and labels/markers preserved
    given().
      pathParam("messageId", newMessageId.toString()).
    expect().
View Full Code Here

      expect().
        statusCode(201).
      when().
        post(REST_PATH + "/mailbox/message?label={labelId}");

    return UUID.fromString( with(response.asString()).getString("id") );
  }
 
  /**
   * Mark given message as read (add SEEN marker)
   *
 
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.