use of uk.gov.ida.hub.samlengine.contracts.AttributeQueryContainerDto in project verify-hub by alphagov.
the class CountryMatchingServiceRequestGeneratorResourceTest method shouldCreateAttributeQueryRequest.
@Test
public void shouldCreateAttributeQueryRequest() throws Exception {
EidasAttributeQueryRequestDto eidasAttributeQueryRequestDto = new EidasAttributeQueryRequestBuilder().build();
Response response = generateEidasAttributeQueryRequest(eidasAttributeQueryRequestDto);
assertThat(response.getStatus()).isEqualTo(Response.Status.OK.getStatusCode());
AttributeQueryContainerDto attributeQueryContainerDto = response.readEntity(AttributeQueryContainerDto.class);
assertThat(attributeQueryContainerDto.getId()).isEqualTo(eidasAttributeQueryRequestDto.getRequestId());
assertThat(attributeQueryContainerDto.getIssuer()).isEqualTo(HUB_ENTITY_ID);
assertThat(attributeQueryContainerDto.getMatchingServiceUri()).isEqualTo(eidasAttributeQueryRequestDto.getAttributeQueryUri());
assertThat(attributeQueryContainerDto.getAttributeQueryClientTimeOut()).isEqualTo(eidasAttributeQueryRequestDto.getMatchingServiceRequestTimeOut());
assertThat(attributeQueryContainerDto.isOnboarding()).isEqualTo(eidasAttributeQueryRequestDto.isOnboarding());
assertThat(attributeQueryContainerDto.getSamlRequest()).contains("saml2p:AttributeQuery");
}
use of uk.gov.ida.hub.samlengine.contracts.AttributeQueryContainerDto in project verify-hub by alphagov.
the class MatchingServiceRequestGeneratorResourceTest method should_createAttributeQueryRequest.
@Test
public void should_createAttributeQueryRequest() throws Exception {
configStub.setupCertificatesForEntity(TEST_RP_MS);
Response response = getAttributeQuery(new AttributeQueryRequestBuilder().build());
AttributeQueryContainerDto entity = response.readEntity(AttributeQueryContainerDto.class);
assertThat(response.getStatus()).isEqualTo(Response.Status.OK.getStatusCode());
assertThat(entity.getSamlRequest()).isNotNull();
}
Aggregations