aboutsummaryrefslogtreecommitdiff
path: root/id.server/src/test/at/gv
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/at/gv
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/at/gv')
-rw-r--r--id.server/src/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java8
-rw-r--r--id.server/src/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java2
-rw-r--r--id.server/src/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java4
3 files changed, 10 insertions, 4 deletions
diff --git a/id.server/src/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java b/id.server/src/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java
index 753b2ef12..5acb23dc2 100644
--- a/id.server/src/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java
+++ b/id.server/src/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java
@@ -1,6 +1,9 @@
package test.at.gv.egovernment.moa.id.auth;
+import java.util.HashMap;
+
import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
import at.gv.egovernment.moa.id.data.AuthenticationData;
import test.at.gv.egovernment.moa.id.UnitTestCase;
@@ -30,7 +33,10 @@ public class AuthenticationServerTest extends UnitTestCase {
String htmlForm = server.startAuthentication(authURL, target, oaURL, templateURL, bkuURL, null);
String sessionID = parseSessionIDFromForm(htmlForm);
String infoboxReadResponse = readFile(TESTDATA_ROOT + "xmldata/testperson1/" + "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);
String createXMLSignatureRequestShould = readFile(testdataRoot + "CreateXMLSignatureRequest.xml");
assertXmlEquals(createXMLSignatureRequestShould, createXMLSignatureRequest);
String createXMLSignatureResponse = readFile(testdataRoot + "CreateXMLSignatureResponse.xml");
diff --git a/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java b/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java
index fa67fa44f..68f7ba973 100644
--- a/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java
+++ b/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java
@@ -39,7 +39,7 @@ public class AuthenticationBlockAssertionBuilderTest extends UnitTestCase {
public void testBuild() throws Exception {
AuthenticationBlockAssertionBuilder builder = new AuthenticationBlockAssertionBuilder();
- String assertionBuilt = builder.buildAuthBlock(ISSUER, ISSUE_INSTANT, AUTH_URL, TARGET, "", "", OA_URL, GEB_DAT);
+ String assertionBuilt = builder.buildAuthBlock(ISSUER, ISSUE_INSTANT, AUTH_URL, TARGET, "", "", OA_URL, GEB_DAT, null);
assertionBuilt = XML_DECL + assertionBuilt;
String assertionShould = XML_DECL + ASSERTION_SHOULD;
assertXmlEquals(assertionShould, assertionBuilt);
diff --git a/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java b/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java
index af452dc78..c146984d0 100644
--- a/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java
+++ b/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java
@@ -53,7 +53,7 @@ public class GetIdentityLinkFormBuilderTest extends TestCase {
String dataURL = "https://1.2.3.4/auth/VerifyIdentityLink?MOASessionID=1234567";
String infoRequest = new CertInfoVerifyXMLSignatureRequestBuilder().build(false);
String infoDataURL = "https://1.2.3.4/auth/StartAuthentication?Target=gb&OA=https://oa.gv.at/";
- String form = new GetIdentityLinkFormBuilder().build(null, null, xmlRequest, dataURL, infoRequest, infoDataURL);
+ String form = new GetIdentityLinkFormBuilder().build(null, null, xmlRequest, dataURL, infoRequest, infoDataURL, null);
String formShould = MessageFormat.format(
FORM, new Object[] { BKU, xmlRequest, dataURL, infoRequest, infoDataURL });
assertEquals(formShould, form);
@@ -64,7 +64,7 @@ public class GetIdentityLinkFormBuilderTest extends TestCase {
String infoRequest = new CertInfoVerifyXMLSignatureRequestBuilder().build(false);
String infoDataURL = "https://1.2.3.4/auth/StartAuthentication?Target=gb&OA=https://oa.gv.at/";
String bkuURL = "http://bku.at/";
- String form = new GetIdentityLinkFormBuilder().build(null, bkuURL, xmlRequest, dataURL, infoRequest, infoDataURL);
+ String form = new GetIdentityLinkFormBuilder().build(null, bkuURL, xmlRequest, dataURL, infoRequest, infoDataURL, null);
String formShould = MessageFormat.format(
FORM, new Object[] { bkuURL, xmlRequest, dataURL, infoRequest, infoDataURL });
assertEquals(formShould, form);