Search in sources :

Example 1 with ErrorListResponse

use of com.redhat.service.smartevents.infra.api.models.responses.ErrorListResponse in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.

the class ErrorsAPITest method testGetList.

@Test
void testGetList() {
    ErrorListResponse response = given().contentType(ContentType.JSON).when().get(APIConstants.ERROR_API_BASE_PATH).as(ErrorListResponse.class);
    assertThat(exceptionClasses).hasSize((int) response.getTotal());
    assertThat(response.getItems().isEmpty()).isFalse();
    for (ErrorResponse item : response.getItems()) {
        assertThat(item).isEqualTo(given().contentType(ContentType.JSON).when().get(item.getHref()).as(ErrorResponse.class));
    }
}
Also used : ErrorListResponse(com.redhat.service.smartevents.infra.api.models.responses.ErrorListResponse) ErrorResponse(com.redhat.service.smartevents.infra.api.models.responses.ErrorResponse) Test(org.junit.jupiter.api.Test) QuarkusTest(io.quarkus.test.junit.QuarkusTest)

Aggregations

ErrorListResponse (com.redhat.service.smartevents.infra.api.models.responses.ErrorListResponse)1 ErrorResponse (com.redhat.service.smartevents.infra.api.models.responses.ErrorResponse)1 QuarkusTest (io.quarkus.test.junit.QuarkusTest)1 Test (org.junit.jupiter.api.Test)1