use of uk.gov.ida.hub.policy.domain.StateController in project verify-hub by alphagov.
the class StateControllerFactoryTest method build_shouldCreateTimeoutStateController.
@Test
public void build_shouldCreateTimeoutStateController() {
StateController controller = factory.build(aTimeoutState().build(), stateTransitionAction);
assertThat(controller).isInstanceOf(TimeoutStateController.class);
}
use of uk.gov.ida.hub.policy.domain.StateController in project verify-hub by alphagov.
the class ErrorStateControllerTests method shouldReturnErrorResponseWhenAskedAndInUserAccountCreatedState.
@Test
public void shouldReturnErrorResponseWhenAskedAndInUserAccountCreatedState() {
UserAccountCreatedState state = UserAccountCreatedStateBuilder.aUserAccountCreatedState().build();
StateController stateController = new UserAccountCreatedStateController(state, identityProvidersConfigProxy, responseFromHubFactory);
when(sessionRepository.getStateController(sessionId, ErrorResponsePreparedState.class)).thenReturn(stateController);
ResponseFromHub responseFromHub = authnRequestFromTransactionHandler.getErrorResponseFromHub(sessionId);
assertThat(responseFromHub.getStatus()).isEqualTo(TransactionIdaStatus.NoAuthenticationContext);
}
use of uk.gov.ida.hub.policy.domain.StateController in project verify-hub by alphagov.
the class StateControllerFactoryTest method shouldCreateACycle3MatchRequestSentStateControllerFromTransitionalClass.
@Deprecated
@Test
public void shouldCreateACycle3MatchRequestSentStateControllerFromTransitionalClass() {
StateController controller = stateControllerFactory.build(aCycle3MatchRequestSentState().build(), stateTransitionAction);
assertThat(controller).isInstanceOf(Cycle3MatchRequestSentStateController.class);
}
use of uk.gov.ida.hub.policy.domain.StateController in project verify-hub by alphagov.
the class StateControllerFactoryTest method shouldCreateACycle0And1MatchRequestSentStateController.
@Test
public void shouldCreateACycle0And1MatchRequestSentStateController() {
StateController controller = stateControllerFactory.build(aCycle0And1MatchRequestSentState().build(), stateTransitionAction);
assertThat(controller).isInstanceOf(Cycle0And1MatchRequestSentStateController.class);
}
use of uk.gov.ida.hub.policy.domain.StateController in project verify-hub by alphagov.
the class StateControllerFactoryTest method shouldCreateACountrySelectedStateController.
@Test
public void shouldCreateACountrySelectedStateController() {
StateController controller = stateControllerFactory.build(aCountrySelectedState().build(), stateTransitionAction);
assertThat(controller).isInstanceOf(CountrySelectedStateController.class);
}
Aggregations