aboutsummaryrefslogtreecommitdiff
path: root/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientProductionTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientProductionTest.java')
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientProductionTest.java68
1 files changed, 68 insertions, 0 deletions
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientProductionTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientProductionTest.java
index 59cf4520..b834eb23 100644
--- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientProductionTest.java
+++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientProductionTest.java
@@ -436,6 +436,74 @@ public class ErnpRestClientProductionTest {
checkErnpResult(resp.getPersonResult().get(0), eidasDataFirst, 1);
}
+
+ @Test
+ @SneakyThrows
+ public void personWasWrongClosedByGovernment() {
+ final String personalIdentifierFirst = "eidasmatcherclosed19770707_01";
+ final String cc = "XZ";
+ final SimpleEidasData eidasDataFirst = SimpleEidasData.builder()
+ .citizenCountryCode(cc)
+ .familyName("EidasMatcher")
+ .givenName("Closed")
+ .dateOfBirth("1977-07-07")
+ .personalIdentifier(cc + "/AT/" + personalIdentifierFirst)
+ .pseudonym(personalIdentifierFirst)
+ .build();
+
+ // search with personalId
+ ErnpRegisterResult resp = client.searchWithPersonIdentifier(personalIdentifierFirst, cc);
+
+ // validate state
+ assertNotNull("no ERnP response", resp);
+ assertEquals("wrong resp size", 1, resp.getPersonResult().size());
+ //checkErnpResult(resp.getPersonResult().get(0), eidasDataFirst, 1);
+
+
+ // start update process
+ ErnpRegisterResult update = client.update(resp.getPersonResult().get(0), eidasDataFirst);
+
+ // validate state
+ assertNotNull("no ERnP response", update);
+ assertEquals("wrong resp size", 1, update.getPersonResult().size());
+ checkErnpResult(update.getPersonResult().get(0), eidasDataFirst, 1);
+
+ }
+
+
+ @Test
+ @SneakyThrows
+ public void personWasClosedByGovernment() {
+ final String personalIdentifierFirst = "eidasmatcherclosed19740404_01";
+ final String cc = "XZ";
+ final SimpleEidasData eidasDataFirst = SimpleEidasData.builder()
+ .citizenCountryCode(cc)
+ .familyName("EidasMatcher")
+ .givenName("Closed")
+ .dateOfBirth("1974-04-04")
+ .personalIdentifier(cc + "/AT/" + personalIdentifierFirst)
+ .pseudonym(personalIdentifierFirst)
+ .build();
+
+ // search with personalId
+ ErnpRegisterResult respPersonal = client.searchWithPersonIdentifier(personalIdentifierFirst, cc);
+
+ // search with mds
+ ErnpRegisterResult respMds = client.searchWithMds(eidasDataFirst.getGivenName(),
+ eidasDataFirst.getFamilyName(), eidasDataFirst.getDateOfBirth(), cc);
+
+
+ // validate state
+ assertNotNull("no ERnP response", respPersonal);
+ assertEquals("wrong resp size", 1, respPersonal.getPersonResult().size());
+ //checkErnpResult(resp.getPersonResult().get(0), eidasDataFirst, 1);
+
+
+ assertNotNull("no ERnP response", respMds);
+ assertEquals("wrong resp size", 1, respMds.getPersonResult().size());
+
+ }
+
@Test
@SneakyThrows