diff options
author | Thomas <> | 2022-08-02 14:00:57 +0200 |
---|---|---|
committer | Thomas <> | 2022-08-02 14:00:57 +0200 |
commit | f381c610acdecb06a8561389a4d1598738559948 (patch) | |
tree | 4e752580f0cfdf6963951c41335001188a27dff1 /modules/authmodule-eIDAS-v2/src/test | |
parent | e0c0b219588322a0f0e7a891369b43ab6c853d71 (diff) | |
parent | 48f19dc45cec670fe62399d09fb34732fb4eeedc (diff) | |
download | National_eIDAS_Gateway-f381c610acdecb06a8561389a4d1598738559948.tar.gz National_eIDAS_Gateway-f381c610acdecb06a8561389a4d1598738559948.tar.bz2 National_eIDAS_Gateway-f381c610acdecb06a8561389a4d1598738559948.zip |
Merge branch 'nightlybuild' into feature/ms_proxy_service
# Conflicts:
# ms_specific_proxyservice/src/test/resources/config/logback_config.xml
Diffstat (limited to 'modules/authmodule-eIDAS-v2/src/test')
3 files changed, 33 insertions, 15 deletions
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientProductionTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientProductionTest.java index d2bfe662..ecffaa19 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientProductionTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientProductionTest.java @@ -45,7 +45,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants; import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.szr.SzrClient; import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.MatchedPersonResult; -import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData; import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.EidasSAuthenticationException; import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.SzrCommunicationException; import at.gv.egiz.eaaf.core.api.data.EaafConstants; @@ -127,13 +126,13 @@ public class SzrClientProductionTest { } - private SimpleEidasData getEidData() { - return SimpleEidasData.builder() + private MatchedPersonResult getEidData() { + return MatchedPersonResult.builder() .familyName("Mustermann") .givenName("Franz") .dateOfBirth("1989-05-04") - .citizenCountryCode("IS") - .pseudonym("1234ffgsdfg56789ABCDEF") + .bpk("1234ffgsdfg56789ABCDEF") + .countryCode("XX") .build(); } diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientTest.java index e61532a3..a35f9bad 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientTest.java @@ -58,7 +58,7 @@ import com.github.skjolber.mockito.soap.SoapServiceRule; import at.asitplus.eidas.specific.core.test.config.dummy.MsConnectorDummyConfigMap; import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants; import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.szr.SzrClient; -import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData; +import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.MatchedPersonResult; import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.EidasSAuthenticationException; import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.SzrCommunicationException; import at.gv.egiz.eaaf.core.api.data.EaafConstants; @@ -270,15 +270,15 @@ public class SzrClientTest { } - private SimpleEidasData getEidData() { - return SimpleEidasData.builder() + private MatchedPersonResult getEidData() { + return MatchedPersonResult.builder() .familyName("Mustermann") .givenName("Franz") .dateOfBirth("1989-05-05") - .citizenCountryCode("IS") - .pseudonym("1234sdgsdfg56789ABCDEF") + .bpk("1234sdgsdfg56789ABCDEF") + .countryCode("IS") .build(); } - + } diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveOtherLoginMethodGuiResponseTaskTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveOtherLoginMethodGuiResponseTaskTest.java index 66867fce..dfbb0266 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveOtherLoginMethodGuiResponseTaskTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveOtherLoginMethodGuiResponseTaskTest.java @@ -126,16 +126,35 @@ httpReq.setParameter(Constants.REQ_SELECTED_LOGIN_METHOD_PARAMETER, SelectedLog @Test public void withAddMeAsNewSelection() throws TaskExecutionException { - testTransition(SelectedLoginMethod.ADD_ME_AS_NEW, Constants.TRANSITION_TO_CREATE_NEW_ERNP_ENTRY_TASK); - assertEquals("return to selection", false, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK)); + testTransition(SelectedLoginMethod.ADD_ME_AS_NEW, Constants.TRANSITION_TO_CREATE_NEW_ERNP_ENTRY_TASK); + + assertEquals("return to selection", false, + executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK)); + assertEquals("return to selection", false, + executionContext.get(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK)); + assertNull("return to selection", + executionContext.get(Constants.TRANSITION_TO_GENERATE_EIDAS_LOGIN)); + assertNull("return to selection", + executionContext.get(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK)); + assertNull("return to selection", + executionContext.get(Constants.TRANSITION_TO_GENERATE_MOBILE_PHONE_SIGNATURE_REQUEST_TASK)); } - + @Test public void withRequestingNewEntrySelection() throws TaskExecutionException { testTransition(SelectedLoginMethod.REQUESTING_NEW_ENTRY, Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK); + assertEquals("return to selection", true, executionContext.get(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK)); - assertEquals("return to selection", false, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK)); + assertEquals("return to selection", false, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK)); + assertNull("return to selection", + executionContext.get(Constants.TRANSITION_TO_CREATE_NEW_ERNP_ENTRY_TASK)); + assertNull("return to selection", + executionContext.get(Constants.TRANSITION_TO_GENERATE_EIDAS_LOGIN)); + assertNull("return to selection", + executionContext.get(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK)); + assertNull("return to selection", + executionContext.get(Constants.TRANSITION_TO_GENERATE_MOBILE_PHONE_SIGNATURE_REQUEST_TASK)); } |