Package com.jayway.restassured.response

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


    InOrder inOrder = inOrder(mockedhistoricProcessInstanceQuery);
    inOrder.verify(mockedhistoricProcessInstanceQuery).unfinished();
    inOrder.verify(mockedhistoricProcessInstanceQuery).list();

    String content = response.asString();
    List<String> instances = from(content).getList("");
    Assert.assertEquals("There should be one process instance returned.", 1, instances.size());
    Assert.assertNotNull("The returned process instance should not be null.", instances.get(0));

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


    InOrder inOrder = inOrder(mockedhistoricProcessInstanceQuery);
    inOrder.verify(mockedhistoricProcessInstanceQuery).unfinished();
    inOrder.verify(mockedhistoricProcessInstanceQuery).list();

    String content = response.asString();
    List<String> instances = from(content).getList("");
    Assert.assertEquals("There should be one process instance returned.", 1, instances.size());
    Assert.assertNotNull("The returned process instance should not be null.", instances.get(0));

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

    Response response = given().pathParam("id", MockProvider.EXAMPLE_JOB_ID)
    .then().expect().statusCode(Status.OK.getStatusCode()).contentType(ContentType.TEXT)
    .when().get(JOB_RESOURCE_GET_STACKTRACE_URL);

    String content = response.asString();
    Assert.assertEquals(stacktrace, content);
  }

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

          .get(HISTORIC_TASK_INSTANCE_RESOURCE_URL);

    InOrder inOrder = inOrder(mockedQuery);
    inOrder.verify(mockedQuery).list();

    String content = response.asString();
    List<String> instances = from(content).getList("");
    Assert.assertEquals("There should be one historic task instance returned.", 1, instances.size());
    Assert.assertNotNull("The returned historic task instance should not be null.", instances.get(0));

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

          .post(HISTORIC_TASK_INSTANCE_RESOURCE_URL);

    InOrder inOrder = inOrder(mockedQuery);
    inOrder.verify(mockedQuery).list();

    String content = response.asString();
    List<String> instances = from(content).getList("");
    Assert.assertEquals("There should be one historic task instance returned.", 1, instances.size());
    Assert.assertNotNull("The returned historic task instance should not be null.", instances.get(0));

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

  public void testSimpleTaskQuery() {
    Response response = given().then().expect()
        .statusCode(Status.OK.getStatusCode())
      .when().get(HISTORIC_ACTIVITY_STATISTICS_URL);

    String content = response.asString();
    List<String> result = from(content).getList("");
    Assert.assertEquals(2, result.size());

    Assert.assertNotNull(result.get(0));
    Assert.assertNotNull(result.get(1));
View Full Code Here

      .then().expect()
        .statusCode(Status.OK.getStatusCode())
      .when()
        .get(HISTORIC_SINGLE_CASE_INSTANCE_URL);

    String content = response.asString();

    String returnedCaseInstanceId = from(content).getString("id");
    String returnedCaseInstanceBusinessKey = from(content).getString("businessKey");
    String returnedCaseDefinitionId = from(content).getString("caseDefinitionId");
    String returnedCreateTime = from(content).getString("createTime");
View Full Code Here

      .then().expect()
        .statusCode(Status.OK.getStatusCode())
      .when()
        .get(HISTORIC_SINGLE_ACTIVITY_INSTANCE_URL);

    String content = response.asString();

    String returnedId = from(content).getString("id");
    String returnedParentActivityInstanceId = from(content).getString("parentActivityInstanceId");
    String returnedActivityId = from(content).getString("activityId");
    String returnedActivityName = from(content).getString("activityName");
View Full Code Here

    // assert query invocation
    InOrder inOrder = Mockito.inOrder(mockedQuery);
    inOrder.verify(mockedQuery).list();

    String content = response.asString();
    List<Map<String, String>> caseDefinitions = from(content).getList("");

    assertThat(caseDefinitions).hasSize(1);
    assertThat(caseDefinitions.get(0)).isNotNull();
View Full Code Here

          .get(HISTORY_INCIDENT_QUERY_URL);

    InOrder inOrder = inOrder(mockedQuery);
    inOrder.verify(mockedQuery).list();

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

    String returnedId = from(content).getString("[0].id");
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.