aboutsummaryrefslogtreecommitdiff
path: root/modules/authmodule-eIDAS-v2/src/test
diff options
context:
space:
mode:
authorThomas <>2022-03-10 12:23:42 +0100
committerThomas <>2022-03-10 12:23:42 +0100
commit9a9c5e8696b4bcff1c4511b5edbc44ca0e48799a (patch)
treeca3d29932ec7926e85946d2c56c0d6c1669fca4e /modules/authmodule-eIDAS-v2/src/test
parente97cd332c0e10f7bb1a24e83e5542019f2570a42 (diff)
downloadNational_eIDAS_Gateway-9a9c5e8696b4bcff1c4511b5edbc44ca0e48799a.tar.gz
National_eIDAS_Gateway-9a9c5e8696b4bcff1c4511b5edbc44ca0e48799a.tar.bz2
National_eIDAS_Gateway-9a9c5e8696b4bcff1c4511b5edbc44ca0e48799a.zip
test(matching): add a few more E2E tests
Diffstat (limited to 'modules/authmodule-eIDAS-v2/src/test')
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ErnpRestClientProductionTest.java25
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientProductionTest.java24
2 files changed, 49 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 66a426a1..fc0f7698 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
@@ -411,6 +411,31 @@ public class ErnpRestClientProductionTest {
}
+ @Ignore
+ @Test
+ @SneakyThrows
+ public void addErnpEntryE2ETest() {
+ final String personalIdentifierFirst = "adfasfsadvsafsafweqrwr432553324";
+ final String cc = "EE";
+ final SimpleEidasData eidasDataFirst = SimpleEidasData.builder()
+ .citizenCountryCode(cc)
+ .familyName("Mustermatch01")
+ .givenName("Max")
+ .dateOfBirth("1965-01-01")
+ .personalIdentifier(cc + "/AT/" + personalIdentifierFirst)
+ .pseudonym(personalIdentifierFirst)
+ .build();
+
+ // execute operation
+ ErnpRegisterResult resp = client.add(eidasDataFirst);
+
+ // validate state
+ assertNotNull("no ERnP response", resp);
+ assertEquals("wrong resp size", 1, resp.getPersonResult().size());
+ checkErnpResult(resp.getPersonResult().get(0), eidasDataFirst, 1);
+
+ }
+
@Test
@SneakyThrows
public void addRandomErnpEntry() {
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientProductionTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientProductionTest.java
index fb52a729..d2bfe662 100644
--- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientProductionTest.java
+++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/SzrClientProductionTest.java
@@ -23,6 +23,8 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.test.clients;
+import static org.junit.Assert.assertNotNull;
+
import java.util.List;
import org.apache.commons.lang3.RandomStringUtils;
@@ -42,6 +44,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.szr.SzrClient;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.MatchedPersonResult;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.EidasSAuthenticationException;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.SzrCommunicationException;
@@ -73,6 +76,27 @@ public class SzrClientProductionTest {
}
+
+ @Ignore
+ @Test
+ public void getEncBaseId() throws SzrCommunicationException {
+
+ MatchedPersonResult matchingResult = MatchedPersonResult.builder()
+ .bpk("QusNG6WEct/vkD1aoRfxHod0Dtk=")
+ .familyName("Garcia")
+ .givenName("javier")
+ .dateOfBirth("1964-12-31")
+ .build();
+
+
+ String baseId = szrClient.getEncryptedStammzahl(matchingResult);
+
+
+ assertNotNull("not encrypted baseId", baseId);
+
+ }
+
+
@Test
public void getEidasBind() throws EidasSAuthenticationException {
String vsz = RandomStringUtils.randomAlphanumeric(10);