From f2df62788d1c47aea5dc16d985fd8b4fd9fa424c Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Thu, 10 Mar 2022 18:04:20 +0100 Subject: fix(matching): store pendingRequest before next asynch. step --- .../eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/authmodule-eIDAS-v2/src/test') diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java index 68b73734..cc092004 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java @@ -30,6 +30,8 @@ import com.fasterxml.jackson.databind.json.JsonMapper; import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants; import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SelectedLoginMethod; import at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateOtherLoginMethodGuiTask; +import at.asitplus.eidas.specific.modules.auth.eidas.v2.test.dummy.DummyOA; +import at.gv.egiz.eaaf.core.api.IRequestStorage; import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; import at.gv.egiz.eaaf.core.impl.idp.module.test.TestRequestImpl; import at.gv.egiz.eaaf.core.impl.idp.process.ExecutionContextImpl; @@ -49,6 +51,8 @@ public class GenerateOtherLoginMethodGuiTaskTest { @Autowired GenerateOtherLoginMethodGuiTask task; + + @Autowired IRequestStorage storage; private ExecutionContextImpl executionContext = new ExecutionContextImpl(); private TestRequestImpl pendingReq; @@ -74,6 +78,7 @@ public class GenerateOtherLoginMethodGuiTaskTest { pendingReq = new TestRequestImpl(); pendingReq.setAuthUrl("https://localhost/ms_connector"); pendingReq.setPendingReqId(RandomStringUtils.randomAlphanumeric(10)); + pendingReq.setSpConfig(new DummyOA()); LocaleContextHolder.resetLocaleContext(); } @@ -103,6 +108,9 @@ public class GenerateOtherLoginMethodGuiTaskTest { assertEquals("advancedMatchingFailedReason", reason, json.get(Constants.HTML_FORM_ADVANCED_MATCHING_FAILED_REASON).asText()); + assertNotNull("pendingRequest not stored", + storage.getPendingRequest(pendingReq.getPendingRequestId())); + } @Test -- cgit v1.2.3