Search in sources :

Example 11 with MatchingProcess

use of uk.gov.ida.hub.policy.domain.MatchingProcess in project verify-hub by alphagov.

the class EidasCycle0And1MatchRequestSentStateControllerTest method shouldReturnNoMatchState.

@Test
public void shouldReturnNoMatchState() {
    when(transactionsConfigProxy.getMatchingProcess(state.getRequestIssuerEntityId())).thenReturn(new MatchingProcess(Optional.absent()));
    doNothing().when(hubEventLogger).logCycle01NoMatchEvent(state.getSessionId(), state.getRequestIssuerEntityId(), state.getRequestId(), state.getSessionExpiryTimestamp());
    NoMatchState expectedState = new NoMatchState(state.getRequestId(), state.getIdentityProviderEntityId(), state.getRequestIssuerEntityId(), state.getSessionExpiryTimestamp(), state.getAssertionConsumerServiceUri(), state.getRelayState(), state.getSessionId(), state.getTransactionSupportsEidas());
    State actualState = eidasCycle0And1MatchRequestSentStateController.getNextStateForNoMatch();
    assertThat(actualState).isEqualTo(expectedState);
}
Also used : EidasAwaitingCycle3DataState(uk.gov.ida.hub.policy.domain.state.EidasAwaitingCycle3DataState) NoMatchState(uk.gov.ida.hub.policy.domain.state.NoMatchState) EidasSuccessfulMatchState(uk.gov.ida.hub.policy.domain.state.EidasSuccessfulMatchState) EidasCycle0And1MatchRequestSentState(uk.gov.ida.hub.policy.domain.state.EidasCycle0And1MatchRequestSentState) EidasCycle0And1MatchRequestSentStateBuilder.anEidasCycle0And1MatchRequestSentState(uk.gov.ida.hub.policy.builder.state.EidasCycle0And1MatchRequestSentStateBuilder.anEidasCycle0And1MatchRequestSentState) State(uk.gov.ida.hub.policy.domain.State) MatchingProcess(uk.gov.ida.hub.policy.domain.MatchingProcess) NoMatchState(uk.gov.ida.hub.policy.domain.state.NoMatchState) Test(org.junit.Test)

Aggregations

MatchingProcess (uk.gov.ida.hub.policy.domain.MatchingProcess)11 Test (org.junit.Test)10 NoMatchFromMatchingService (uk.gov.ida.hub.policy.domain.NoMatchFromMatchingService)5 NoMatchState (uk.gov.ida.hub.policy.domain.state.NoMatchState)5 State (uk.gov.ida.hub.policy.domain.State)4 Cycle0And1MatchRequestSentStateBuilder.aCycle0And1MatchRequestSentState (uk.gov.ida.hub.policy.builder.state.Cycle0And1MatchRequestSentStateBuilder.aCycle0And1MatchRequestSentState)2 EidasCycle0And1MatchRequestSentStateBuilder.anEidasCycle0And1MatchRequestSentState (uk.gov.ida.hub.policy.builder.state.EidasCycle0And1MatchRequestSentStateBuilder.anEidasCycle0And1MatchRequestSentState)2 Cycle3AttributeRequestData (uk.gov.ida.hub.policy.domain.Cycle3AttributeRequestData)2 UserAccountCreationAttribute (uk.gov.ida.hub.policy.domain.UserAccountCreationAttribute)2 AwaitingCycle3DataState (uk.gov.ida.hub.policy.domain.state.AwaitingCycle3DataState)2 Cycle0And1MatchRequestSentState (uk.gov.ida.hub.policy.domain.state.Cycle0And1MatchRequestSentState)2 EidasAwaitingCycle3DataState (uk.gov.ida.hub.policy.domain.state.EidasAwaitingCycle3DataState)2 EidasCycle0And1MatchRequestSentState (uk.gov.ida.hub.policy.domain.state.EidasCycle0And1MatchRequestSentState)2 EidasSuccessfulMatchState (uk.gov.ida.hub.policy.domain.state.EidasSuccessfulMatchState)2 SuccessfulMatchState (uk.gov.ida.hub.policy.domain.state.SuccessfulMatchState)2 UserAccountCreationRequestSentState (uk.gov.ida.hub.policy.domain.state.UserAccountCreationRequestSentState)2 URI (java.net.URI)1 MatchFromMatchingServiceBuilder.aMatchFromMatchingService (uk.gov.ida.hub.policy.builder.domain.MatchFromMatchingServiceBuilder.aMatchFromMatchingService)1 AttributeQueryRequestDto (uk.gov.ida.hub.policy.contracts.AttributeQueryRequestDto)1 MatchFromMatchingService (uk.gov.ida.hub.policy.domain.MatchFromMatchingService)1