Package com.jayway.restassured.response

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


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

    String content = response.asString();
    List<String> instances = from(content).getList("");
    Assert.assertEquals(1, instances.size());
    Assert.assertNotNull(instances.get(0));

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


    InOrder inOrder = inOrder(mockedHistoricCaseActivityInstanceQuery);
    inOrder.verify(mockedHistoricCaseActivityInstanceQuery).notEnded();
    inOrder.verify(mockedHistoricCaseActivityInstanceQuery).list();

    String content = response.asString();
    List<String> instances = from(content).getList("");
    Assert.assertEquals(1, instances.size());
    Assert.assertNotNull(instances.get(0));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        String mediaType = response.getContentType();
        assert mediaType.startsWith("application/javascript");

        // check for jsonp wrapping
        String bodyString = response.asString();
        assert bodyString.startsWith("jsonp(");
        assert bodyString.endsWith(");");

        // extract the internal json data
        String body = bodyString.substring(6,bodyString.length()-2);
View Full Code Here

            .log().ifError()
        .when()
            .get("/reports/alertDefinitions");

        assert response != null;
        assert response.asString().startsWith("Name,Description,Enabled,Priority,Parent,Ancestry,Details URL");

    }

    @Test
    public void testGetConfigurationHistory() throws Exception {
View Full Code Here

            .log().ifError()
        .when()
            .get("/reports/configurationHistory");

        assert response != null;
        assert response.asString().startsWith("Version,Date Submitted,Date Completed,Status,Name,Ancestry,Details URL");
    }

    @Test
    public void testGetDriftCompliance() throws Exception {
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.