use of uk.gov.ida.hub.samlengine.contracts.MatchingServiceHealthCheckerRequestDto in project verify-hub by alphagov.
the class MatchingServiceHealthcheckRequestGeneratorResourceTest method should_createHealthcheckAttributeQueryRequestShouldReturnErrorStatusDtoWhenThereIsAProblem.
@Test
public void should_createHealthcheckAttributeQueryRequestShouldReturnErrorStatusDtoWhenThereIsAProblem() throws Exception {
configStub.setupCertificatesForEntity(TEST_RP_MS);
Response response = getAttributeQuery(new MatchingServiceHealthCheckerRequestDto(TEST_RP, null));
assertThat(response.getStatus()).isEqualTo(Response.Status.BAD_REQUEST.getStatusCode());
ErrorStatusDto entity = response.readEntity(ErrorStatusDto.class);
assertThat(entity.getExceptionType()).isEqualTo(ExceptionType.INVALID_INPUT);
}
use of uk.gov.ida.hub.samlengine.contracts.MatchingServiceHealthCheckerRequestDto in project verify-hub by alphagov.
the class MatchingServiceHealthcheckRequestGeneratorResourceTest method should_createHealthcheckAttributeQueryRequest.
@Test
public void should_createHealthcheckAttributeQueryRequest() throws Exception {
configStub.setupCertificatesForEntity(TEST_RP_MS);
Response response = getAttributeQuery(new MatchingServiceHealthCheckerRequestDto(TEST_RP, TEST_RP_MS));
SamlMessageDto entity = response.readEntity(SamlMessageDto.class);
assertThat(response.getStatus()).isEqualTo(Response.Status.OK.getStatusCode());
assertThat(entity.getSamlMessage()).isNotNull();
}
Aggregations