Package com.jayway.restassured.response

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


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

    String content = response.asString();

    String returnedCaseActivityInstanceId = from(content).getString("id");
    String returnedParentCaseActivityInstanceId = from(content).getString("parentCaseActivityInstanceId");
    String returnedCaseActivityId = from(content).getString("caseActivityId");
    String returnedCaseActivityName = from(content).getString("caseActivityName");
View Full Code Here


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

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

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

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

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

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

    InOrder inOrder = inOrder(mockQuery);
    inOrder.verify(mockQuery).authorizationType(Authorization.AUTH_TYPE_GLOBAL);
    inOrder.verify(mockQuery).list();

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

    Authorization mockAuthorization = mockAuthorizations.get(0);
View Full Code Here

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

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

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

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

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

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

        .expect()
        .statusCode(Status.OK.getStatusCode())
      .when()
        .get(XML_DEFINITION_URL);

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

  @Test
View Full Code Here

        .expect()
        .statusCode(Status.OK.getStatusCode())
      .when()
        .get(XML_DEFINITION_BY_KEY_URL);

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

  @Test
View Full Code Here

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

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

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

  public void testIncompleteProcessInstance() {
    setUpMockInstanceQuery(createIncompleteMockInstances());
    Response response = expect().statusCode(Status.OK.getStatusCode())
        .when().get(PROCESS_INSTANCE_QUERY_URL);

    String content = response.asString();
    String returnedBusinessKey = from(content).getString("[0].businessKey");
    Assert.assertNull("Should be null, as it is also null in the original process instance on the server.",
        returnedBusinessKey);
  }
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.