use of uk.gov.ida.hub.policy.domain.state.Cycle3DataInputCancelledState in project verify-hub by alphagov.
the class EidasAwaitingCycle3DataStateControllerTest method handleCancellation.
@Test
public void handleCancellation() {
doNothing().when(hubEventLogger).logCycle3DataInputCancelled(state.getSessionId(), state.getRequestIssuerEntityId(), state.getSessionExpiryTimestamp(), state.getRequestId());
final Cycle3DataInputCancelledState expectedState = new Cycle3DataInputCancelledState(state.getRequestId(), state.getSessionExpiryTimestamp(), state.getRelayState(), state.getRequestIssuerEntityId(), state.getAssertionConsumerServiceUri(), new SessionId(state.getSessionId().getSessionId()), state.getTransactionSupportsEidas());
controller.handleCancellation();
verify(stateTransitionAction).transitionTo(expectedState);
}
use of uk.gov.ida.hub.policy.domain.state.Cycle3DataInputCancelledState in project verify-hub by alphagov.
the class AbstractAwaitingCycle3DataStateController method handleCancellation.
public void handleCancellation() {
hubEventLogger.logCycle3DataInputCancelled(state.getSessionId(), state.getRequestIssuerEntityId(), state.getSessionExpiryTimestamp(), state.getRequestId());
Cycle3DataInputCancelledState cycle3DataInputCancelledState = new Cycle3DataInputCancelledState(state.getRequestId(), state.getSessionExpiryTimestamp(), state.getRelayState(), state.getRequestIssuerEntityId(), state.getAssertionConsumerServiceUri(), new SessionId(state.getSessionId().getSessionId()), state.getTransactionSupportsEidas());
stateTransitionAction.transitionTo(cycle3DataInputCancelledState);
}
use of uk.gov.ida.hub.policy.domain.state.Cycle3DataInputCancelledState in project verify-hub by alphagov.
the class ErrorStateControllerTests method shouldReturnErrorResponseWhenAskedAndInCycle3DataInputCancelledState.
@Test
public void shouldReturnErrorResponseWhenAskedAndInCycle3DataInputCancelledState() {
Cycle3DataInputCancelledState state = Cycle3DataInputCancelledStateBuilder.aCycle3DataInputCancelledState().build();
StateController stateController = new Cycle3DataInputCancelledStateController(state, responseFromHubFactory);
when(sessionRepository.getStateController(sessionId, ErrorResponsePreparedState.class)).thenReturn(stateController);
ResponseFromHub responseFromHub = authnRequestFromTransactionHandler.getErrorResponseFromHub(sessionId);
assertThat(responseFromHub.getStatus()).isEqualTo(TransactionIdaStatus.NoAuthenticationContext);
}
Aggregations