use of uk.gov.ida.integrationtest.hub.samlengine.builders.EidasAttributeQueryRequestBuilder 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");
}
Aggregations