aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskFirstTest.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskFirstTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskFirstTest.java
index 2614f9ba..924a180d 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskFirstTest.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskFirstTest.java
@@ -303,6 +303,38 @@ public class InitialSearchTaskFirstTest {
}
}
+
+ @Test
+ @DirtiesContext
+ /**
+ * NO match found in ZMR and ErnB with Initial search
+ */
+ public void testNode105() throws Exception {
+
+ //Mock ZMR
+ ArrayList<RegisterResult> zmrResult = new ArrayList<>();
+ zmrClient = Mockito.mock(DummyZmrClient.class);
+ Mockito.when(zmrClient.searchWithPersonIdentifer("max123")).thenReturn(zmrResult);//"de/st/max123"???
+ task.setZmrClient(zmrClient);
+
+ //Mock ernb
+ ArrayList<RegisterResult> ernbResult = new ArrayList<>();
+ ernbClient = Mockito.mock(DummyErnbClient.class);
+ Mockito.when(ernbClient.searchWithPersonIdentifer("max123")).thenReturn(ernbResult);//"de/st/max123"???
+ task.setErnbClient(ernbClient);
+
+ try {
+ task.execute(pendingReq, executionContext);
+
+ String bPk = (String)
+ pendingReq.getSessionData(AuthProcessDataWrapper.class).getGenericDataFromSession(Constants.DATA_RESULT_MATCHING_BPK);
+ Assert.assertTrue("Wrong bpk", bPk.equals("105"));
+ } catch (final TaskExecutionException e) {
+ Assert.assertTrue("Wrong workflow, should not reach this point", false);
+ }
+ }
+
+
@NotNull
private AuthenticationResponse buildDummyAuthResponse() throws URISyntaxException {
return buildDummyAuthResponse(RandomStringUtils.randomAlphabetic(10), RandomStringUtils.randomAlphabetic(10),