aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-modul-citizencard_authentication/src/test/java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-10-25 16:23:23 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-10-25 16:23:23 +0200
commitf10fb18bac8e4b98460d100a4af42a943ddb75df (patch)
treed53343fb928cb0186f6fa88ef2684bbea490b413 /id/server/modules/moa-id-modul-citizencard_authentication/src/test/java
parent83a92eead9d389060ec43e9459c5a1367aefc29a (diff)
downloadmoa-id-spss-f10fb18bac8e4b98460d100a4af42a943ddb75df.tar.gz
moa-id-spss-f10fb18bac8e4b98460d100a4af42a943ddb75df.tar.bz2
moa-id-spss-f10fb18bac8e4b98460d100a4af42a943ddb75df.zip
fix another problem in session database
Diffstat (limited to 'id/server/modules/moa-id-modul-citizencard_authentication/src/test/java')
-rw-r--r--id/server/modules/moa-id-modul-citizencard_authentication/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java6
-rw-r--r--id/server/modules/moa-id-modul-citizencard_authentication/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java7
2 files changed, 6 insertions, 7 deletions
diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java
index b26fd4738..f2fde6322 100644
--- a/id/server/modules/moa-id-modul-citizencard_authentication/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java
+++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java
@@ -47,8 +47,8 @@
package test.at.gv.egovernment.moa.id.auth.builder;
import at.gv.egovernment.moa.id.auth.builder.PersonDataBuilder;
-import at.gv.egovernment.moa.id.auth.data.IdentityLink;
import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
+import at.gv.egovernment.moa.id.commons.api.data.IIdentityLink;
import at.gv.egovernment.moa.util.Constants;
import test.at.gv.egovernment.moa.id.UnitTestCase;
@@ -67,14 +67,14 @@ public class PersonDataBuilderTest extends UnitTestCase implements Constants {
}
public void testBuild() throws Exception {
String xmlInfoboxReadResponse = readFile("data/test/xmldata/testperson1/InfoboxReadResponse.xml");
- IdentityLink il = new InfoboxReadResponseParser(xmlInfoboxReadResponse).parseIdentityLink();
+ IIdentityLink il = new InfoboxReadResponseParser(xmlInfoboxReadResponse).parseIdentityLink();
String xmlPersonData = new PersonDataBuilder().build(il, true);
String xmlPersonDataShould = "<pr:Person xsi:type=\"pr:PhysicalPersonType\"><pr:Identification><pr:Value>123456789012</pr:Value><pr:Type>http://reference.e-government.gv.at/names/persondata/20020228#zmr-zahl</pr:Type></pr:Identification><pr:Name><pr:GivenName>Hermann</pr:GivenName><pr:FamilyName primary=\"undefined\">Muster</pr:FamilyName></pr:Name><pr:DateOfBirth>1968-10-22</pr:DateOfBirth></pr:Person>";
assertPersonDataEquals(xmlPersonDataShould, xmlPersonData);
}
public void testBuildNoZMRZahl() throws Exception {
String xmlInfoboxReadResponse = readFile("data/test/xmldata/testperson1/InfoboxReadResponse.xml");
- IdentityLink il = new InfoboxReadResponseParser(xmlInfoboxReadResponse).parseIdentityLink();
+ IIdentityLink il = new InfoboxReadResponseParser(xmlInfoboxReadResponse).parseIdentityLink();
String xmlPersonData = new PersonDataBuilder().build(il, false);
String xmlPersonDataShould = XML_DECL + "<pr:Person xsi:type=\"pr:PhysicalPersonType\"><pr:Name><pr:GivenName>Hermann</pr:GivenName><pr:FamilyName primary=\"undefined\">Muster</pr:FamilyName></pr:Name><pr:DateOfBirth>1968-10-22</pr:DateOfBirth></pr:Person>";
assertPersonDataEquals(xmlPersonDataShould, xmlPersonData);
diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java
index 8d7dee597..38bf1cab6 100644
--- a/id/server/modules/moa-id-modul-citizencard_authentication/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java
+++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java
@@ -49,10 +49,9 @@ package test.at.gv.egovernment.moa.id.auth.parser;
import java.io.RandomAccessFile;
import test.at.gv.egovernment.moa.id.UnitTestCase;
-
-import at.gv.egovernment.moa.id.auth.data.IdentityLink;
import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser;
import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
+import at.gv.egovernment.moa.id.commons.api.data.IIdentityLink;
/**
* @author Paul Ivancsics
@@ -81,7 +80,7 @@ public class InfoboxReadResponseParserTest extends UnitTestCase {
InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(xmlInfoboxReadResponse);
ilap = new IdentityLinkAssertionParser(irrp.parseSAMLAssertion());
- IdentityLink idl = ilap.parseIdentityLink();
+ IIdentityLink idl = ilap.parseIdentityLink();
System.out.println(idl.getGivenName());
System.out.println(idl.getFamilyName());
System.out.println(idl.getDateOfBirth());
@@ -101,7 +100,7 @@ public class InfoboxReadResponseParserTest extends UnitTestCase {
InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(xmlInfoboxReadResponse);
ilap = new IdentityLinkAssertionParser(irrp.parseSAMLAssertion());
- IdentityLink idl = ilap.parseIdentityLink();
+ IIdentityLink idl = ilap.parseIdentityLink();
System.out.println(idl.getGivenName());
System.out.println(idl.getFamilyName());
System.out.println(idl.getDateOfBirth());