aboutsummaryrefslogtreecommitdiff
path: root/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific
diff options
context:
space:
mode:
authorThomas <>2022-03-10 13:53:12 +0100
committerThomas <>2022-03-10 13:53:12 +0100
commitad7891d0c51adac7498f85558652c6fdf613ccce (patch)
treeef20d0a4b43f446ed80190a69353f31beb53dfbd /modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific
parent85346a1a30275f67e9e00b536cb05c8d7e85d1b1 (diff)
downloadNational_eIDAS_Gateway-ad7891d0c51adac7498f85558652c6fdf613ccce.tar.gz
National_eIDAS_Gateway-ad7891d0c51adac7498f85558652c6fdf613ccce.tar.bz2
National_eIDAS_Gateway-ad7891d0c51adac7498f85558652c6fdf613ccce.zip
fix(matching): unset flag from ExecutionContext that raise into a loop
Diffstat (limited to 'modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific')
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveOtherLoginMethodGuiResponseTaskTest.java10
1 files changed, 8 insertions, 2 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 da8a7497..6ec7d6e0 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
@@ -4,8 +4,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThrows;
-import static org.springframework.util.Assert.isInstanceOf;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Before;
@@ -76,21 +74,29 @@ public class ReceiveOtherLoginMethodGuiResponseTaskTest {
@Test
public void withMobileSignatureSelection() throws TaskExecutionException {
testTransition(SelectedLoginMethod.MOBILE_PHONE_SIGNATURE_LOGIN, 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));
+
}
@Test
public void withEidasSelection() throws TaskExecutionException {
testTransition(SelectedLoginMethod.EIDAS_LOGIN, Constants.TRANSITION_TO_GENERATE_EIDAS_LOGIN);
+ assertEquals("return to selection", false, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK));
+
}
@Test
public void withNoOtherLoginSelection() throws TaskExecutionException {
testTransition(SelectedLoginMethod.NO_OTHER_LOGIN, Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK);
+ assertEquals("return to selection", false, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK));
+
}
@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));
+
}
public void testTransition(SelectedLoginMethod loginMethod, String expectedTransition) throws TaskExecutionException {