Examples of jsonPath()


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

            System.out.println("after post");
            System.out.flush();
            // in this case, we don't get 302, because manual import is synchronous

            createdResourceId = response.jsonPath().getInt("resourceId");

            System.out.flush();
            System.out.println("\n  Resource is created, resource Id = " + createdResourceId + " \n");
            System.out.flush();
View Full Code Here

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

            .expect()
                .statusCode(201)
            .when()
                .post("/resource/platform/api-test-dummy");

        String platformId = response.jsonPath().getString("resourceId");

        try {
            with().body("{\"value\":\"CPU\"}") // Type of new resource
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
View Full Code Here

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

        .expect()
            .statusCode(200)
        .when()
            .get("/resource/{id}/availability");

        String oldType = response.jsonPath().get("type");

        try {
            long now = System.currentTimeMillis()-100;
            given()
                .body("{\"since\":" + now + ",\"type\":\"DOWN\",\"resourceId\":" + _platformId + "}")
View Full Code Here

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

            .expect()
                .statusCode(200)
            .when()
                .get("/resource/{id}/availability");

            String currentType = response.jsonPath().get("type");
            assert currentType.equals("DOWN");
        } finally {

            // Set back to original value
            long now = System.currentTimeMillis()-100;
View Full Code Here

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

                .log().everything()
            .when()
                .get("/operation/history/{hid}");


            jsonPath = response.jsonPath();
            status = jsonPath.getString("status");
            int code = response.statusCode();

            if (code==200 && (status.equals("Success") || status.equals("Failed"))) {
                done = true;
View Full Code Here

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

                    .get(location);

                status = response.getStatusCode();
            }

            createdResourceId = response.jsonPath().getInt("resourceId");

            System.out.flush();
            System.out.println("\n  Deploy is done, resource Id = " + createdResourceId + " \n");
            System.out.flush();
View Full Code Here

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

                .statusCode(200)
                .log().ifError()
            .when()
                .get("/resource");

        JsonPath jp = r.jsonPath();

        int coreGuiId = jp.getInt("[0].resourceId");
        // now list it's children
        r =
            given()
View Full Code Here

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

                .statusCode(200)
                .log().ifError()
            .when()
                .get("/resource/{rid}/children");

        jp = r.jsonPath();

        webRuntimeResourceId = jp.getInt("[0].resourceId");

        // finally lookup calltime
        r =
View Full Code Here

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

                .statusCode(200)
                .log().ifError()
            .when()
                .get("/resource/{rid}/schedules");

        jp = r.jsonPath();
        callTimeScheduleId = jp.getInt("[0].scheduleId");

    }

    @Test
View Full Code Here

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

                .header(acceptJson)
                .queryParam("q", X_TEST_GROUP)
            .when()
                .get("/group");

        JsonPath jsonPath = response.jsonPath();
        if (jsonPath.get("id[0]")!=null) {
            int groupId = jsonPath.getInt("id[0]");
            given()
                .pathParam("id", groupId)
            .delete("/group/{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.