aboutsummaryrefslogtreecommitdiff
path: root/modules/authmodule-eIDAS-v2/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'modules/authmodule-eIDAS-v2/src/test/java')
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientTest.java50
1 files changed, 50 insertions, 0 deletions
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 82d89e3e..dcf0bc00 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
@@ -463,6 +463,56 @@ public class ErnpRestClientTest {
@Test
@SneakyThrows
+ public void searchWithPersonalIdZmrKittAndClosed() {
+ final String cc = "DE";
+ final SimpleEidasData eidasDataFirst = generateRandomEidasData(cc);
+
+ // set ERnP response
+ mockWebServer.enqueue(new MockResponse().setResponseCode(200)
+ .setBody(IOUtils.toString(
+ ErnpRestClientTest.class.getResourceAsStream(
+ "/data/ernp/1_search_with_personalId_zmr_kitt_and_closed_resp.json"),
+ "UTF-8"))
+ .setHeader("Content-Type", "application/json;charset=utf-8"));
+
+ // execute operation
+ 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", 1, resp.getZmrPersonResult().size());
+
+ }
+
+ @Test
+ @SneakyThrows
+ public void searchWithPersonalIdClosedAndZmrKitt() {
+ final String cc = "DE";
+ final SimpleEidasData eidasDataFirst = generateRandomEidasData(cc);
+
+ // set ERnP response
+ mockWebServer.enqueue(new MockResponse().setResponseCode(200)
+ .setBody(IOUtils.toString(
+ ErnpRestClientTest.class.getResourceAsStream(
+ "/data/ernp/1_search_with_personalId_closed_and_zmr_kitt_resp.json"),
+ "UTF-8"))
+ .setHeader("Content-Type", "application/json;charset=utf-8"));
+
+ // execute operation
+ 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", 1, resp.getZmrPersonResult().size());
+
+ }
+
+ @Test
+ @SneakyThrows
public void searchWithPersonalIdSingleResult() {
final String cc = "DE";
final SimpleEidasData eidasDataFirst = generateRandomEidasData(cc);