Package com.jayway.restassured.path.json

Examples of com.jayway.restassured.path.json.JsonPath


        .expect()
            .statusCode(200)
        .when()
            .get("/group");

        JsonPath jsonPath = response.jsonPath();
        assert jsonPath.get("[0].name").equals(X_TEST_GROUP); // [0] as the query returns a list
        int groupId = jsonPath.get("[0].id");
        assert groupId == createdId;

        // Fetch id by id
        given()
            .pathParam("id",groupId)
View Full Code Here


            expect()
                .statusCode(200)
                .log().everything()
            .when()
                .get("/user/favorites/resource");
            JsonPath jp = r.jsonPath();
            assert jp.getList("resourceId").contains(_platformId);
        }
        finally {
            given()
                .pathParam("rid",_platformId)
            .expect()
View Full Code Here

            expect()
                .statusCode(200)
                .log().everything()
            .when()
                .get("/user/favorites/resource");
            JsonPath jp = r.jsonPath();
            assert jp.getList("resourceId").contains(_platformId);
        }
        finally {
            given()
                .pathParam("rid",_platformId)
            .expect()
View Full Code Here

        UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_OK);

        List<EDITOR> editors = new ArrayList<EDITOR>();

        JsonPath jsonPath = response.jsonPath();

        List<Map<String, ?>> items = jsonPath.getList("");

        for (int i = 0; i < items.size(); i++) {
            jsonPath.setRoot("[" + i + "]");

            EDITOR editor = demarshall(context, jsonPath);
            editors.add(editor);
        }
View Full Code Here

        UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_OK);

        List<PushApplicationEditor> applications = new ArrayList<PushApplicationEditor>();

        JsonPath jsonPath = response.jsonPath();

        List<Map<String, ?>> items = jsonPath.getList("");

        for (int i = 0; i < items.size(); i++) {
            jsonPath.setRoot("[" + i + "]");

            // FIXME this might not be the right implementation
            // it can actually leak values of previous implementation
            PushApplicationEditor pushApplication = demarshall(context, jsonPath);
            applications.add(pushApplication);
View Full Code Here

        UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_OK);

        List<EDITOR> editors = new ArrayList<EDITOR>();

        JsonPath jsonPath = response.jsonPath();

        List<Map<String, ?>> items = jsonPath.getList("");

        for (int i = 0; i < items.size(); i++) {
            jsonPath.setRoot("[" + i + "]");

            EDITOR editor = demarshall(context, jsonPath);
            editors.add(editor);
        }
View Full Code Here

        UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_OK);

        List<SimplePushVariantEditor> editors = new ArrayList<SimplePushVariantEditor>();

        JsonPath jsonPath = response.jsonPath();

        List<Map<String, ?>> items = jsonPath.getList("");

        for (int i = 0; i < items.size(); i++) {
            jsonPath.setRoot("[" + i + "]");

            SimplePushVariantEditor editor = demarshall(context, jsonPath);
            editors.add(editor);
        }
View Full Code Here

        UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_OK);

        List<ChromePackagedAppVariantEditor> editors = new ArrayList<ChromePackagedAppVariantEditor>();

        JsonPath jsonPath = response.jsonPath();

        List<Map<String, ?>> items = jsonPath.getList("");

        for (int i = 0; i < items.size(); i++) {
            jsonPath.setRoot("[" + i + "]");

            ChromePackagedAppVariantEditor editor = demarshall(context, jsonPath);
            editors.add(editor);
        }
View Full Code Here

        UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_OK);

        List<AndroidVariantEditor> editors = new ArrayList<AndroidVariantEditor>();

        JsonPath jsonPath = response.jsonPath();

        List<Map<String, ?>> items = jsonPath.getList("");

        for (int i = 0; i < items.size(); i++) {
            jsonPath.setRoot("[" + i + "]");

            AndroidVariantEditor editor = demarshall(context, jsonPath);
            editors.add(editor);
        }
View Full Code Here

        UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_OK);

        List<iOSVariantEditor> editors = new ArrayList<iOSVariantEditor>();

        JsonPath jsonPath = response.jsonPath();

        List<Map<String, ?>> items = jsonPath.getList("");

        for (int i = 0; i < items.size(); i++) {
            jsonPath.setRoot("[" + i + "]");

            iOSVariantEditor editor = demarshall(context, jsonPath);
            editors.add(editor);
        }
View Full Code Here

TOP

Related Classes of com.jayway.restassured.path.json.JsonPath

Copyright © 2018 www.massapicom. 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.