From bb04051b8854d452a94df8488157e5234e1afea7 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Thu, 1 Dec 2022 10:43:37 +0100 Subject: feat(ernp): change handling of entities with status "PersonAmtlichBeenden" again - filter all entries that are marked as "PersonAmtlichBeenden" - set flag 'allowNewErnpEntryByUser' to false in case of matching steps that requires single hit --- .../auth/eidas/v2/test/clients/ErnpRestClientTest.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'modules/authmodule-eIDAS-v2/src/test/java/at') diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientTest.java index dcf0bc00..8057eafe 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientTest.java @@ -404,10 +404,14 @@ public class ErnpRestClientTest { .setHeader("Content-Type", "application/json;charset=utf-8")); // execute operation - EidasSAuthenticationException error = assertThrows("wrong Exception", EidasSAuthenticationException.class, - () -> client.searchWithPersonIdentifier(eidasDataFirst.getPseudonym(), cc)); - assertEquals("wrong errorCode", "module.eidasauth.matching.03", error.getErrorId()); - mockWebServer.takeRequest(); + ErnpRegisterResult resp = client.searchWithPersonIdentifier(eidasDataFirst.getPseudonym(), cc); + + // validate state + mockWebServer.takeRequest(); + assertNotNull("no ERnP response", resp); + assertEquals("wrong resp size", 0, resp.getPersonResult().size()); + assertEquals("wrong resp size", 0, resp.getZmrPersonResult().size()); + assertFalse("newErnpEntryAllowed", resp.isAllowErnpEntryByUser()); } @@ -532,6 +536,7 @@ public class ErnpRestClientTest { assertNotNull("no ERnP response", resp); assertEquals("wrong resp size", 1, resp.getPersonResult().size()); assertEquals("wrong resp size", 0, resp.getZmrPersonResult().size()); + assertTrue("newErnpEntryAllowed", resp.isAllowErnpEntryByUser()); RegisterResult persInfo = resp.getPersonResult().get(0); assertEquals("wrong familyname", "CtKKrtUe", persInfo.getFamilyName()); assertEquals("wrong givenName", "dUeYzUFg", persInfo.getGivenName()); @@ -795,7 +800,6 @@ public class ErnpRestClientTest { .setHeader("Content-Type", "application/json;charset=utf-8")); // execute operation - // execute operation ErnpRegisterResult resp = client.add(eidasDataFirst); // validate request -- cgit v1.2.3