Package com.jayway.restassured.response

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


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

        assert response!=null;
        assert response.asString().startsWith("Resource Type,Plugin,Category,Version,Count");
    }

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


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

        assert response!=null;
        assert response.asString().startsWith("Resource Type,Plugin,Category,Version,Count");
    }

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

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

        assert response!=null;
        assert response.asString().startsWith("Name,Version,CPU,Memory,Swap");
    }

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

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

        assert response!=null;
        assert response.asString().startsWith("Creation Time,Name,Condition Text,Priority");
    }

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

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

        assert response!=null;
        assert response.asString().startsWith("Creation Time,Definition,Snapshot,Category,Path");
    }

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

            .log().everything()
        .when()
            .get("/reports/recentOperations");

        assert response!=null;
        assert response.asString().startsWith("Date Submitted,Operation,Requester");

    }

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

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

        assert response!=null;
        assert response.asString().startsWith("Resource,Ancestry");
    }
}
View Full Code Here

        .expect()
        //.log().all()
        .statusCode( status )
        .when().get( getUrl("WEBHDFS") + "/v1" + file + ( isUseGateway() ? "" : "?user.name=" + user ) );
    if( response.getStatusCode() == HttpStatus.SC_OK ) {
      String actualContent = response.asString();
      String expectedContent = getResourceString( resource, Charset.forName("UTF-8") );
      assertThat( actualContent, is( expectedContent ) );
    }
    assertComplete();
  }
View Full Code Here

        .expect()
        //.log().all()
        .statusCode( status )
        .when().get( getUrl("NAMENODE") + file + ( isUseGateway() ? "" : "?user.name=" + user ) );
    if( response.getStatusCode() == HttpStatus.SC_OK ) {
      String actualContent = response.asString();
      String expectedContent = getResourceString( resource );
      assertThat( actualContent, is( expectedContent ) );
    }
    assertComplete();
  }
View Full Code Here

                .post();

        if(response.statusCode() == HttpStatus.SC_OK) {
            try {
                AccessTokenResponse tokenResponse =
                        JsonSerialization.readValue(response.asString(), AccessTokenResponse.class);

                return new Session(getUnifiedPushServerUrl(), tokenResponse);
                // FIXME handle the possible io exception!
            } catch (IOException e) {
                e.printStackTrace();
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.