Search in sources :

Example 1 with SamlAuthnResponseTranslatorDtoBuilder.aSamlAuthnResponseTranslatorDto

use of uk.gov.ida.integrationtest.hub.samlengine.builders.SamlAuthnResponseTranslatorDtoBuilder.aSamlAuthnResponseTranslatorDto in project verify-hub by alphagov.

the class IdpAuthnResponseTranslatorResourceTest method return422IfMSEntityIdNotPresent.

@Test
public void return422IfMSEntityIdNotPresent() throws Exception {
    SamlAuthnResponseTranslatorDto samlResponseDto = SamlAuthnResponseTranslatorDtoBuilder.aSamlAuthnResponseTranslatorDto().withMatchingServiceEntityId(null).build();
    Response clientResponse = postToSamlEngine(samlResponseDto);
    assertThat(clientResponse.getStatus()).isEqualTo(422);
}
Also used : Response(javax.ws.rs.core.Response) SamlAuthnResponseTranslatorDto(uk.gov.ida.hub.samlengine.contracts.SamlAuthnResponseTranslatorDto) SamlAuthnResponseTranslatorDtoBuilder.aSamlAuthnResponseTranslatorDto(uk.gov.ida.integrationtest.hub.samlengine.builders.SamlAuthnResponseTranslatorDtoBuilder.aSamlAuthnResponseTranslatorDto) Test(org.junit.Test)

Aggregations

Response (javax.ws.rs.core.Response)1 Test (org.junit.Test)1 SamlAuthnResponseTranslatorDto (uk.gov.ida.hub.samlengine.contracts.SamlAuthnResponseTranslatorDto)1 SamlAuthnResponseTranslatorDtoBuilder.aSamlAuthnResponseTranslatorDto (uk.gov.ida.integrationtest.hub.samlengine.builders.SamlAuthnResponseTranslatorDtoBuilder.aSamlAuthnResponseTranslatorDto)1