aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas <>2022-03-17 08:18:49 +0100
committerThomas <>2022-03-17 08:18:49 +0100
commit9235f8bddea23171f27f4bb00cd0e78493dea01f (patch)
treee1f0be7f4dc2a537b358cef9d4c4376d81014a1c
parent7727b187019a3a6ff8f9d79819e878b4cb6b7d69 (diff)
parentebc5f11b7ff0ca374818445da0a62276a91707dd (diff)
downloadNational_eIDAS_Gateway-9235f8bddea23171f27f4bb00cd0e78493dea01f.tar.gz
National_eIDAS_Gateway-9235f8bddea23171f27f4bb00cd0e78493dea01f.tar.bz2
National_eIDAS_Gateway-9235f8bddea23171f27f4bb00cd0e78493dea01f.zip
Merge branch 'nightlybuild' into feature/ms_proxy_before_refactoring
-rw-r--r--connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
index 63b11322..c2b87aa4 100644
--- a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
+++ b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
@@ -12,6 +12,9 @@ import java.time.Instant;
import java.util.Map;
import java.util.Timer;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
import javax.xml.transform.TransformerException;
import org.apache.commons.lang3.RandomStringUtils;
@@ -85,7 +88,10 @@ import eu.eidas.specificcommunication.protocol.SpecificCommunicationService;
import lombok.val;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import net.shibboleth.utilities.java.support.xml.XMLParserException;
+import szrservices.GetIdentityLinkEidasResponse;
+import szrservices.PersonInfoType;
import szrservices.SZR;
+import szrservices.SZRException_Exception;
import szrservices.SignContentEntry;
import szrservices.SignContentResponseType;
@@ -400,6 +406,8 @@ public class FullStartUpAndProcessTest {
private void injectSzrResponse() throws Exception {
+ setSzrResponseIdentityLink("/data/szr/szr_resp_valid_1.xml");
+
when(szrMock, "getStammzahlEncrypted", any(), any()).thenReturn(vsz);
val signContentResp = new SignContentResponseType();
final SignContentEntry signContentEntry = new SignContentEntry();
@@ -493,4 +501,17 @@ public class FullStartUpAndProcessTest {
metadataProvider.addMetadataResolverIntoChain(fileSystemResolver);
}
+
+ private void setSzrResponseIdentityLink(String responseXmlPath) throws JAXBException, SZRException_Exception {
+ final JAXBContext jaxbContext = JAXBContext
+ .newInstance(szrservices.ObjectFactory.class, org.w3._2001._04.xmldsig_more.ObjectFactory.class,
+ org.w3._2000._09.xmldsig.ObjectFactory.class,
+ at.gv.e_government.reference.namespace.persondata._20020228.ObjectFactory.class);
+ final Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
+ final GetIdentityLinkEidasResponse szrResponse = (GetIdentityLinkEidasResponse) jaxbUnmarshaller
+ .unmarshal(this.getClass().getResourceAsStream(responseXmlPath));
+ org.mockito.Mockito.when(szrMock.getIdentityLinkEidas(any(PersonInfoType.class))).thenReturn(szrResponse.getGetIdentityLinkReturn());
+
+ }
+
}