aboutsummaryrefslogtreecommitdiff
path: root/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java')
-rw-r--r--connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java52
1 files changed, 26 insertions, 26 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 4e66d324..fd22cea4 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
@@ -115,7 +115,7 @@ import szrservices.SignContentResponseType;
public class FullStartUpAndProcessTest {
private static final String FINAL_REDIRECT = "http://localhost/public/secure/finalizeAuthProtocol?pendingid=";
-
+
@Autowired private WebApplicationContext wac;
@Autowired private PvpEndPointCredentialProvider credentialProvider;
@Autowired private PvpMetadataProvider metadataProvider;
@@ -128,7 +128,7 @@ public class FullStartUpAndProcessTest {
@Autowired private ProtocolFinalizationController finalize;
@Autowired private IStatusMessenger messager;
-
+
@Rule
public final SoapServiceRule soap = SoapServiceRule.newInstance();
@@ -203,7 +203,7 @@ public class FullStartUpAndProcessTest {
}
LogMessageProviderFactory.setStatusMessager(messager);
-
+
szrMock = soap.mock(SZR.class, "http://localhost:1234/demoszr");
zmrClient = soap.mock(ServicePort.class, "http://localhost:1234/demozmr");
@@ -240,7 +240,7 @@ public class FullStartUpAndProcessTest {
Assert.assertFalse("selectionPage is empty", selectionPage.isEmpty());
String pendingReqId = extractRequestToken(selectionPage,
- "<input type=\"hidden\" name=\"pendingid\" value=\"");
+ "<input type=\"hidden\" name=\"pendingid\" value=\"");
Assert.assertFalse("PendingReqId", pendingReqId.isEmpty());
@@ -316,7 +316,7 @@ public class FullStartUpAndProcessTest {
Assert.assertFalse("selectionPage is empty", selectionPage.isEmpty());
String pendingReqId = extractRequestToken(selectionPage,
- "<input type=\"hidden\" name=\"pendingid\" value=\"");
+ "<input type=\"hidden\" name=\"pendingid\" value=\"");
Assert.assertFalse("PendingReqId", pendingReqId.isEmpty());
@@ -357,8 +357,8 @@ public class FullStartUpAndProcessTest {
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(eidasNodeRespReq, finalizeResp));
injectZmrResponse();
- injectSzrResponse();
-
+ injectSzrResponse();
+
//excute eIDAS node response
eidasSignal.restoreEidasAuthProcess(eidasNodeRespReq, finalizeResp);
@@ -415,7 +415,7 @@ public class FullStartUpAndProcessTest {
extractor.getSingleAttributeValue("urn:eidgvat:attributes.piiTransactionId"));
Assert.assertEquals("Wrong attr:EID_STATUS_LEVEL ", "http://eid.gv.at/eID/status/identity",
extractor.getSingleAttributeValue(PvpAttributeDefinitions.EID_IDENTITY_STATUS_LEVEL_NAME));
-
+
}
private void injectSzrResponse() throws Exception {
@@ -428,52 +428,52 @@ public class FullStartUpAndProcessTest {
when(szrMock.signContent(any(), any(), any())).thenReturn(signContentResp);
}
-
+
private void injectZmrResponse() throws Exception {
ResponseType resp = new ResponseType();
-
+
WorkflowInfoServer workflow = new WorkflowInfoServer();
- workflow.setProzessInstanzID(new BigInteger(RandomStringUtils.randomNumeric(10)));
+ workflow.setProzessInstanzID(new BigInteger(RandomStringUtils.randomNumeric(10)));
resp.setWorkflowInfoServer(workflow);
PersonSuchenResponse persRespObj = new PersonSuchenResponse();
PersonensuchergebnisType searchResult = new PersonensuchergebnisType();
PersonErgebnisSatzType personInfoObj = new PersonErgebnisSatzType();
- resp.setPersonSuchenResponse(persRespObj);
- persRespObj.setPersonensuchergebnis(searchResult);
-
+ resp.setPersonSuchenResponse(persRespObj);
+ persRespObj.setPersonensuchergebnis(searchResult);
+
searchResult.setGefundeneSaetzeERnP(0);
- searchResult.setGefundeneSaetze(1);
+ searchResult.setGefundeneSaetze(1);
searchResult.getPersonErgebnisSatz().add(personInfoObj);
-
+
PersonErgebnisType personInfo = new PersonErgebnisType();
Personendaten personDataObj = new Personendaten();
personInfoObj.setPersonendaten(personDataObj);
personDataObj.getPersonErgebnis().add(personInfo);
-
+
EidasIdentitaetErgebnisType eidasPersonalIdentifier = new EidasIdentitaetErgebnisType();
personInfo.getEidasIdentitaet().add(eidasPersonalIdentifier);
eidasPersonalIdentifier.setEidasWert(personalId);
eidasPersonalIdentifier.setEidasArt(Constants.eIDAS_ATTRURN_PERSONALIDENTIFIER);
- eidasPersonalIdentifier.setStaatscode2(cc);
-
+ eidasPersonalIdentifier.setStaatscode2(cc);
+
NatuerlichePersonErgebnisType natInfo = new NatuerlichePersonErgebnisType();
IdentificationType bpk = new IdentificationType();
PersonenName natName = new PersonenName();
natInfo.getIdentification().add(bpk);
- natInfo.setPersonenName(natName);
+ natInfo.setPersonenName(natName);
personInfo.setNatuerlichePerson(natInfo);
-
+
bpk.setType(EaafConstants.URN_PREFIX_CDID + "ZP");
- bpk.setValue(RandomStringUtils.randomAlphabetic(10));
+ bpk.setValue(RandomStringUtils.randomAlphabetic(10));
natInfo.setGeburtsdatum(dateOfBirth);
natName.setFamilienname(familyName);
- natName.setVorname(givenName);
-
+ natName.setVorname(givenName);
+
when(zmrClient.service(any(), any())).thenReturn(resp);
-
+
}
-
+
private String validateEidasNodeRequestAndBuildResponse(String eidasNodeReqToken)
throws SpecificCommunicationException, URISyntaxException {