Package com.jayway.restassured.response

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


    Set<String> expectedSet = MockProvider.createMockSetFromList(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID_LIST);

    inOrder.verify(instanceQuery).processInstanceIds(expectedSet);
    inOrder.verify(instanceQuery).list();

    String content = response.asString();
    List<String> instances = from(content).getList("");
    Assert.assertEquals("There should be two process definitions returned.", 2, instances.size());

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


    InOrder inOrder = Mockito.inOrder(instanceQuery);

    inOrder.verify(instanceQuery).processInstanceIds(processInstanceIds);
    inOrder.verify(instanceQuery).list();

    String content = response.asString();
    List<String> instances = from(content).getList("");
    Assert.assertEquals("There should be two process definitions returned.", 2, instances.size());

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

    Set<String> expectedSet = MockProvider.createMockSetFromList(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID_LIST);

    inOrder.verify(instanceQuery).processInstanceIds(expectedSet);
    inOrder.verify(instanceQuery).list();

    String content = response.asString();
    List<String> instances = from(content).getList("");
    Assert.assertEquals("There should be two process definitions returned.", 2, instances.size());

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

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

    String content = response.asString();
    List<String> instances = from(content).getList("");
    Assert.assertEquals("There should be two process definitions returned.", 2, instances.size());

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

    verify(variableInstanceQueryMock).variableNameIn("foo", "bar");
    verify(variableInstanceQueryMock, times(1)).list();
    verify(variableInstanceQueryMock, times(1)).disableBinaryFetching();
    verify(variableInstanceQueryMock, times(1)).disableCustomObjectDeserialization();

    String content = response.asString();
    List<Map<String, Object>> variables = from(content).getJsonObject("_embedded.variable");

    // task variable 'foo'
    verifyTaskVariableValue(variables.get(0), "foo", "task", TASK_A_ID);
    // task variable 'task'
View Full Code Here

    verify(variableInstanceQueryMock).variableScopeIdIn(TASK_A_ID, EXECUTION_A_ID, PROCESS_INSTANCE_A_ID, TASK_B_ID, EXECUTION_B_ID, TASK_C_ID, CASE_EXECUTION_A_ID, CASE_INSTANCE_A_ID);
    verify(variableInstanceQueryMock, times(1)).variableNameIn((String) anyVararg());
    verify(variableInstanceQueryMock).variableNameIn("foo", "bar");
    verify(variableInstanceQueryMock, times(1)).list();

    String content = response.asString();
    List<Map<String, Object>> taskList = from(content).getList("_embedded.task");

    // task A
    List<Map<String, Object>> variables = getEmbeddedTaskVariables(taskList.get(0));
    assertThat(variables).hasSize(4);
View Full Code Here

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

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

    verify(mockedQuery).disableBinaryFetching();
View Full Code Here

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

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

    verify(mockedQuery).disableBinaryFetching();
View Full Code Here

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

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

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

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