aboutsummaryrefslogtreecommitdiff
path: root/modules/authmodule-eIDAS-v2
diff options
context:
space:
mode:
authorThomas <>2022-08-02 08:00:18 +0200
committerThomas <>2022-08-02 08:00:18 +0200
commit7cafb476eb9d235a285f9ac82937854abee06608 (patch)
tree073030b4e5fe738398ff5c1a8a507c1e64f07e3c /modules/authmodule-eIDAS-v2
parent8d9a0115e8c6fe7ea1067d070fa13b2cde48dcfe (diff)
downloadNational_eIDAS_Gateway-7cafb476eb9d235a285f9ac82937854abee06608.tar.gz
National_eIDAS_Gateway-7cafb476eb9d235a285f9ac82937854abee06608.tar.bz2
National_eIDAS_Gateway-7cafb476eb9d235a285f9ac82937854abee06608.zip
test(matching): optimize validation of execution-context parameters
Diffstat (limited to 'modules/authmodule-eIDAS-v2')
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveOtherLoginMethodGuiResponseTaskTest.java27
1 files changed, 22 insertions, 5 deletions
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 7b3a8657..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,18 +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);
+ 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));
- 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));
-
}
@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));
}