aboutsummaryrefslogtreecommitdiff
path: root/id.server/src/test/abnahme/A/Test200VerifyIdentityLink.java
diff options
context:
space:
mode:
authorharald.bratko <harald.bratko@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-01-10 15:46:55 +0000
committerharald.bratko <harald.bratko@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-01-10 15:46:55 +0000
commit547b3b6eb2be2414df1524941c8cc95d83ede3c5 (patch)
tree2e31a08d5abb7655764003521191305bb2c39771 /id.server/src/test/abnahme/A/Test200VerifyIdentityLink.java
parentb224ba28efa8e3082524f1de0d6851d73fe66f03 (diff)
downloadmoa-id-spss-547b3b6eb2be2414df1524941c8cc95d83ede3c5.tar.gz
moa-id-spss-547b3b6eb2be2414df1524941c8cc95d83ede3c5.tar.bz2
moa-id-spss-547b3b6eb2be2414df1524941c8cc95d83ede3c5.zip
Adapted tests to be compileable within MOA-ID 1.4.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@772 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id.server/src/test/abnahme/A/Test200VerifyIdentityLink.java')
-rw-r--r--id.server/src/test/abnahme/A/Test200VerifyIdentityLink.java64
1 files changed, 48 insertions, 16 deletions
diff --git a/id.server/src/test/abnahme/A/Test200VerifyIdentityLink.java b/id.server/src/test/abnahme/A/Test200VerifyIdentityLink.java
index c3325349d..d0ba51923 100644
--- a/id.server/src/test/abnahme/A/Test200VerifyIdentityLink.java
+++ b/id.server/src/test/abnahme/A/Test200VerifyIdentityLink.java
@@ -1,10 +1,15 @@
package test.abnahme.A;
+import java.util.HashMap;
+
import org.w3c.dom.Element;
+
+
import test.abnahme.AbnahmeTestCase;
import at.gv.egovernment.moa.id.AuthenticationException;
import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
import at.gv.egovernment.moa.id.auth.builder.VerifyXMLSignatureRequestBuilder;
import at.gv.egovernment.moa.id.auth.data.IdentityLink;
import at.gv.egovernment.moa.id.auth.invoke.SignatureVerificationInvoker;
@@ -30,8 +35,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
String sessionID = startAuthentication();
System.out.println(sessionID);
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
-
- String createXMLSignatureRequest = server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ String createXMLSignatureRequest = server.verifyIdentityLink(sessionID, parameters);
InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(infoboxReadResponse);
IdentityLink idl = irrp.parseIdentityLink();
@@ -61,8 +67,11 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
startAuthentication();
String sessionID = "0";
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
fail(this.getName() + " hat KEINE FEHLER geworfen");
}
@@ -87,7 +96,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
System.out.println(sessionID);
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
fail(this.getName() + " hat KEINE FEHLER geworfen");
}
@@ -108,8 +119,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
System.out.println(sessionID);
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
fail(this.getName() + " hat KEINE FEHLER geworfen");
}
@@ -128,7 +140,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
String sessionID = startAuthentication();
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
fail(this.getName() + " hat KEINE FEHLER geworfen");
}
@@ -148,7 +162,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
System.out.println(sessionID);
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
}
catch (ParseException e) {
System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
@@ -165,7 +181,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
System.out.println(sessionID);
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
}
catch (ValidateException e) {
System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
@@ -183,7 +201,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
System.out.println(sessionID);
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
fail(this.getName() + " hat KEINE FEHLER geworfen");
@@ -204,7 +224,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
System.out.println(sessionID);
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
fail(this.getName() + " hat KEINE FEHLER geworfen");
}
@@ -224,7 +246,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
System.out.println(sessionID);
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
fail(this.getName() + " hat KEINE FEHLER geworfen");
}
@@ -244,7 +268,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
System.out.println(sessionID);
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
fail(this.getName() + " hat KEINE FEHLER geworfen");
}
@@ -264,7 +290,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
fail(this.getName() + " hat KEINE FEHLER geworfen");
}
@@ -288,7 +316,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
// System.out.println(infoboxReadResponse);
try {
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
fail(this.getName() + " hat KEINE FEHLER geworfen");
}
@@ -307,7 +337,9 @@ public class Test200VerifyIdentityLink extends AbnahmeTestCase {
String sessionID = startAuthentication();
System.out.println(sessionID);
String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
- server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(infoboxReadResponse);
IdentityLink idl = irrp.parseIdentityLink();
Element domVerifyXMLSignatureRequest = new VerifyXMLSignatureRequestBuilder().build(idl, AuthConfigurationProvider.getInstance().getMoaSpAuthBlockTrustProfileID());