Package org.rhq.modules.integrationTests.restApi.d

Examples of org.rhq.modules.integrationTests.restApi.d.Schedule



    @Test
    public void testUpdateSchedule() throws Exception {

        Schedule schedule = new Schedule();
        schedule.setCollectionInterval(1234567);
        schedule.setEnabled(true);

        given()
            .header(acceptJson)
            .contentType(ContentType.JSON)
            .pathParam("id", numericScheduleId)
            .body(schedule)
        .expect()
            .statusCode(200)
            .log().ifError()
        .when()
            .put("/metric/schedule/{id}");

        // reset to original interval

        schedule.setCollectionInterval(defaultInterval);
        given()
            .header(acceptJson)
            .contentType(ContentType.JSON)
            .pathParam("id", numericScheduleId)
            .body(schedule)
View Full Code Here


    }

    @Test
    public void testUpdateUnknownSchedule() throws Exception {

        Schedule schedule = new Schedule();
        schedule.setCollectionInterval(1234567);
        schedule.setEnabled(true);

        given()
            .header(acceptJson)
            .contentType(ContentType.JSON)
            .pathParam("id", 43)
View Full Code Here

    }

    @Test
    public void testGetUpdateDefinition() throws Exception {

        Schedule schedule = new Schedule();
        schedule.setCollectionInterval(1234567);
        schedule.setEnabled(true);

        // First read the current data

        Schedule def =
        given()
            .header(acceptJson)
            .pathParam("id", numericScheduleDefinitionId)
        .expect()
            .statusCode(200)
        .when()
            .get("/metric/definition/{id}")
        .as(Schedule.class);

        long oldInterval = def.getCollectionInterval();


        given()
            .header(acceptJson)
            .contentType(ContentType.JSON)
View Full Code Here

    }

    @Test
    public void testUpdateBadDefinition() throws Exception {

        Schedule schedule = new Schedule();
        schedule.setCollectionInterval(1234567);
        schedule.setEnabled(true);


        given()
            .header(acceptJson)
            .contentType(ContentType.JSON)
View Full Code Here

TOP

Related Classes of org.rhq.modules.integrationTests.restApi.d.Schedule

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.