Search in sources :

Example 11 with PersistentId

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

the class EidasAwaitingCycle3DataStateBuilderTest method build.

@Test
public void build() {
    EidasAwaitingCycle3DataState state = EidasAwaitingCycle3DataStateBuilder.anEidasAwaitingCycle3DataState().build();
    assertThat(state.getRequestId()).isEqualTo("requestId");
    assertThat(state.getRequestIssuerEntityId()).isEqualTo("requestIssuerId");
    assertThat(state.getSessionExpiryTimestamp()).isEqualTo(DateTime.now().plusMinutes(10));
    assertThat(state.getAssertionConsumerServiceUri()).isEqualTo(URI.create("assertionConsumerServiceUri"));
    assertThat(state.getSessionId()).isEqualTo(new SessionId("sessionId"));
    assertThat(state.getTransactionSupportsEidas()).isEqualTo(true);
    assertThat(state.getIdentityProviderEntityId()).isEqualTo("identityProviderEntityId");
    assertThat(state.getMatchingServiceEntityId()).isEqualTo("matchingServiceAdapterEntityId");
    assertThat(state.getRelayState()).isEqualTo(Optional.of("relayState"));
    assertThat(state.getPersistentId()).isEqualTo(new PersistentId("nameId"));
    assertThat(state.getLevelOfAssurance()).isEqualTo(LevelOfAssurance.LEVEL_2);
    assertThat(state.getEncryptedIdentityAssertion()).isEqualTo("encryptedIdentityAssertion");
}
Also used : EidasAwaitingCycle3DataState(uk.gov.ida.hub.policy.domain.state.EidasAwaitingCycle3DataState) SessionId(uk.gov.ida.hub.policy.domain.SessionId) PersistentId(uk.gov.ida.hub.policy.domain.PersistentId) Test(org.junit.Test)

Example 12 with PersistentId

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

the class EidasCycle0And1MatchRequestSentStateBuilderTest method build.

@Test
public void build() {
    EidasCycle0And1MatchRequestSentState state = EidasCycle0And1MatchRequestSentStateBuilder.anEidasCycle0And1MatchRequestSentState().build();
    assertThat(state.getRequestId()).isEqualTo("requestId");
    assertThat(state.getIdentityProviderEntityId()).isEqualTo("identityProviderEntityId");
    assertThat(state.getSessionExpiryTimestamp()).isEqualTo(DateTime.now().plusMinutes(10));
    assertThat(state.getRelayState()).isEqualTo(Optional.absent());
    assertThat(state.getRequestIssuerEntityId()).isEqualTo("requestIssuerId");
    assertThat(state.getEncryptedIdentityAssertion()).isEqualTo("encryptedIdentityAssertion");
    assertThat(state.getAssertionConsumerServiceUri()).isEqualTo(URI.create("assertionConsumerServiceUri"));
    assertThat(state.getMatchingServiceAdapterEntityId()).isEqualTo("matchingServiceAdapterEntityId");
    assertThat(state.getSessionId()).isEqualTo(new SessionId("sessionId"));
    assertThat(state.getIdpLevelOfAssurance()).isEqualTo(LevelOfAssurance.LEVEL_2);
    assertThat(state.getPersistentId()).isEqualTo(new PersistentId("default-name-id"));
    assertThat(state.getTransactionSupportsEidas()).isEqualTo(true);
}
Also used : EidasCycle0And1MatchRequestSentState(uk.gov.ida.hub.policy.domain.state.EidasCycle0And1MatchRequestSentState) SessionId(uk.gov.ida.hub.policy.domain.SessionId) PersistentId(uk.gov.ida.hub.policy.domain.PersistentId) Test(org.junit.Test)

Example 13 with PersistentId

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

the class EidasCycle3MatchRequestSentStateBuilderTest method build.

@Test
public void build() {
    EidasCycle3MatchRequestSentState state = EidasCycle3MatchRequestSentStateBuilder.anEidasCycle3MatchRequestSentState().build();
    assertThat(state.getRequestId()).isEqualTo("requestId");
    assertThat(state.getIdentityProviderEntityId()).isEqualTo("identityProviderEntityId");
    assertThat(state.getSessionExpiryTimestamp()).isEqualTo(DateTime.now().plusMinutes(10));
    assertThat(state.getRelayState()).isEqualTo(Optional.absent());
    assertThat(state.getRequestIssuerEntityId()).isEqualTo("requestIssuerId");
    assertThat(state.getEncryptedIdentityAssertion()).isEqualTo("encryptedIdentityAssertion");
    assertThat(state.getAssertionConsumerServiceUri()).isEqualTo(URI.create("assertionConsumerServiceUri"));
    assertThat(state.getMatchingServiceAdapterEntityId()).isEqualTo("matchingServiceAdapterEntityId");
    assertThat(state.getSessionId()).isEqualTo(new SessionId("sessionId"));
    assertThat(state.getIdpLevelOfAssurance()).isEqualTo(LevelOfAssurance.LEVEL_2);
    assertThat(state.getPersistentId()).isEqualTo(new PersistentId("default-name-id"));
    assertThat(state.getTransactionSupportsEidas()).isEqualTo(true);
}
Also used : EidasCycle3MatchRequestSentState(uk.gov.ida.hub.policy.domain.state.EidasCycle3MatchRequestSentState) SessionId(uk.gov.ida.hub.policy.domain.SessionId) PersistentId(uk.gov.ida.hub.policy.domain.PersistentId) Test(org.junit.Test)

Aggregations

PersistentId (uk.gov.ida.hub.policy.domain.PersistentId)13 Test (org.junit.Test)8 SuccessFromIdp (uk.gov.ida.hub.policy.domain.SuccessFromIdp)6 PersistentIdBuilder.aPersistentId (uk.gov.ida.hub.policy.builder.domain.PersistentIdBuilder.aPersistentId)4 SuccessFromIdpBuilder.aSuccessFromIdp (uk.gov.ida.hub.policy.builder.domain.SuccessFromIdpBuilder.aSuccessFromIdp)4 SessionId (uk.gov.ida.hub.policy.domain.SessionId)3 EidasAttributeQueryRequestDto (uk.gov.ida.hub.policy.contracts.EidasAttributeQueryRequestDto)2 FraudDetectedDetails (uk.gov.ida.hub.policy.domain.FraudDetectedDetails)2 FraudFromIdp (uk.gov.ida.hub.policy.domain.FraudFromIdp)2 HashMap (java.util.HashMap)1 AttributeQueryRequestDto (uk.gov.ida.hub.policy.contracts.AttributeQueryRequestDto)1 MatchingServiceConfigEntityDataDto (uk.gov.ida.hub.policy.contracts.MatchingServiceConfigEntityDataDto)1 Cycle3Dataset (uk.gov.ida.hub.policy.domain.Cycle3Dataset)1 LevelOfAssurance (uk.gov.ida.hub.policy.domain.LevelOfAssurance)1 Cycle0And1MatchRequestSentState (uk.gov.ida.hub.policy.domain.state.Cycle0And1MatchRequestSentState)1 EidasAwaitingCycle3DataState (uk.gov.ida.hub.policy.domain.state.EidasAwaitingCycle3DataState)1 EidasCycle0And1MatchRequestSentState (uk.gov.ida.hub.policy.domain.state.EidasCycle0And1MatchRequestSentState)1 EidasCycle3MatchRequestSentState (uk.gov.ida.hub.policy.domain.state.EidasCycle3MatchRequestSentState)1