Examples of jsonPath()


Examples of com.jayway.restassured.response.Response.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
View Full Code Here

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

            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)
View Full Code Here

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

            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)
View Full Code Here

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

                    .body(marshall(blueprint))
                    .post("/rest/registry/device");

            UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_OK);

            editors.add(demarshall(context, response.jsonPath()));
        }
        return editors;
    }

    public void unregister(CONTEXT context, Collection<? extends Installation> entities) {
View Full Code Here

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

        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 + "]");
View Full Code Here

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

                .get("/rest/applications/{variantID}/installations/{installationID}",
                        context.getParent().getVariantID(), id);

        UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_OK);

        return demarshall(context, response.jsonPath());
    }

    @Override
    public void update(CONTEXT context, Collection<? extends Installation> entities) {
        for (Installation entity : entities) {
View Full Code Here

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

                    .body(marshall(pushApplication))
                    .post("/rest/applications");

            UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_CREATED);

            registeredApplications.add(demarshall(context, response.jsonPath()));
        }
        return registeredApplications;
    }

    @Override
View Full Code Here

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

        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 + "]");
View Full Code Here

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

                .header(Headers.acceptJson())
                .get("/rest/applications/{pushApplicationID}", id);

        UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_OK);

        return demarshall(context, response.jsonPath());
    }

    @Override
    public void update(PushApplicationContext context, Collection<? extends PushApplication> pushApplications) {
        for (PushApplication pushApplication : pushApplications) {
View Full Code Here

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

                    .body(marshall(blueprint))
                    .post("/rest/registry/device");

            UnexpectedResponseException.verifyResponse(response, HttpStatus.SC_OK);

            editors.add(demarshall(context, response.jsonPath()));
        }
        return editors;
    }

    public void unregister(CONTEXT context, Collection<? extends Installation> entities) {
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.