use of org.opensaml.saml.saml2.core.Status in project verify-hub by alphagov.
the class IdpIdaStatusMarshallerTest method shouldMarshallStatusDetailWithStatusValueContainingUpliftFailed.
@Test
public void shouldMarshallStatusDetailWithStatusValueContainingUpliftFailed() {
Status status = marshaller.toSamlStatus(IdpIdaStatus.upliftFailed());
StatusValue actual = (StatusValue) status.getStatusDetail().getOrderedChildren().get(0);
assertThat(actual.getNamespaces()).isEmpty();
assertThat(actual.getValue()).isEqualTo(StatusValue.UPLIFT_FAILED);
}
use of org.opensaml.saml.saml2.core.Status in project verify-hub by alphagov.
the class MatchingServiceIdaStatusToSamlStatusMarshallerTest method toSamlStatus_shouldTransformRequesterError.
@Test
public void toSamlStatus_shouldTransformRequesterError() {
Status transformedStatus = marshaller.toSamlStatus(MatchingServiceIdaStatus.RequesterError);
assertThat(transformedStatus.getStatusCode().getValue()).isEqualTo(StatusCode.REQUESTER);
}
use of org.opensaml.saml.saml2.core.Status in project verify-hub by alphagov.
the class MatchingServiceIdaStatusToSamlStatusMarshallerTest method toSamlStatus_shouldTransformMatchingServiceMatch.
@Test
public void toSamlStatus_shouldTransformMatchingServiceMatch() {
Status transformedStatus = marshaller.toSamlStatus(MatchingServiceIdaStatus.MatchingServiceMatch);
assertThat(transformedStatus.getStatusCode().getValue()).isEqualTo(StatusCode.SUCCESS);
assertThat(transformedStatus.getStatusCode().getStatusCode()).isNotNull();
assertThat(transformedStatus.getStatusCode().getStatusCode().getValue()).isEqualTo(SamlStatusCode.MATCH);
}
use of org.opensaml.saml.saml2.core.Status in project verify-hub by alphagov.
the class MatchingServiceIdaStatusToSamlStatusMarshallerTest method toSamlStatus_shouldTransformNoMatchingServiceMatch.
@Test
public void toSamlStatus_shouldTransformNoMatchingServiceMatch() {
Status transformedStatus = marshaller.toSamlStatus(MatchingServiceIdaStatus.NoMatchingServiceMatchFromMatchingService);
assertThat(transformedStatus.getStatusCode().getValue()).isEqualTo(StatusCode.RESPONDER);
assertThat(transformedStatus.getStatusCode().getStatusCode()).isNotNull();
assertThat(transformedStatus.getStatusCode().getStatusCode().getValue()).isEqualTo(SamlStatusCode.NO_MATCH);
}
use of org.opensaml.saml.saml2.core.Status in project verify-hub by alphagov.
the class SamlProfileTransactionIdaStatusMarshallerTest method toSamlStatus_shouldTransformNoMatchingServiceMatchMayRetry.
@Test
public void toSamlStatus_shouldTransformNoMatchingServiceMatchMayRetry() {
Status transformedStatus = marshaller.toSamlStatus(TransactionIdaStatus.NoMatchingServiceMatchFromHub);
assertThat(transformedStatus.getStatusCode().getValue()).isEqualTo(StatusCode.RESPONDER);
assertThat(transformedStatus.getStatusCode().getStatusCode()).isNotNull();
assertThat(transformedStatus.getStatusCode().getStatusCode().getValue()).isEqualTo(SamlStatusCode.NO_MATCH);
}
Aggregations