aboutsummaryrefslogtreecommitdiff
path: root/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java
diff options
context:
space:
mode:
authormcentner <mcentner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-08-08 07:25:32 +0000
committermcentner <mcentner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-08-08 07:25:32 +0000
commit43e57a42832ea8b4ceb0317f3c9028a4174ffa7b (patch)
treef5ed9074b8d7b89b2dd5b22d326f63be103e7551 /id.server/src/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java
parent10889e9dea2cc2f70b475e6ff7af37fdba1621d9 (diff)
downloadmoa-id-spss-43e57a42832ea8b4ceb0317f3c9028a4174ffa7b.tar.gz
moa-id-spss-43e57a42832ea8b4ceb0317f3c9028a4174ffa7b.tar.bz2
moa-id-spss-43e57a42832ea8b4ceb0317f3c9028a4174ffa7b.zip
Adapted project directory structure to suit the new maven based build process.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@909 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id.server/src/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java')
-rw-r--r--id.server/src/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java52
1 files changed, 0 insertions, 52 deletions
diff --git a/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java b/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java
deleted file mode 100644
index 3ec73ee4c..000000000
--- a/id.server/src/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package test.at.gv.egovernment.moa.id.auth.builder;
-
-import at.gv.egovernment.moa.id.BuildException;
-import at.gv.egovernment.moa.id.auth.builder.SAMLArtifactBuilder;
-import at.gv.egovernment.moa.util.Base64Utils;
-
-import test.at.gv.egovernment.moa.id.UnitTestCase;
-
-/**
- * @author Paul Ivancsics
- * @version $Id$
- */
-public class SAMLArtifactBuilderTest extends UnitTestCase {
-
- private static final String AUTH_URL = "https://moa.gv.at/auth/";
- private static final String SESSION_ID_1 = "123456";
- private static final String SESSION_ID_2 = "123457";
- private static final String SESSION_ID_3 = "1234567";
-
- private SAMLArtifactBuilder builder;
- private byte[] artifact1;
- private byte[] artifact2;
- private byte[] artifact3;
-
- public SAMLArtifactBuilderTest(String name) {
- super(name);
- }
- protected void setUp() throws Exception {
- builder = new SAMLArtifactBuilder();
- artifact1 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_1), false);
- artifact2 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_2), false);
- artifact3 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_3), false);
- }
-
- public void testBuildArtifactLength() throws BuildException {
- assertEquals(42, artifact1.length);
- assertEquals(42, artifact2.length);
- assertEquals(42, artifact3.length);
- }
- public void testBuildSameArtifact() throws Exception {
- byte[] artifact1Clone = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_1), false);
- assertEquals(new String(artifact1), new String(artifact1Clone));
- }
- public void testBuildDifferentArtifacts() throws BuildException {
- String msg = "SAML Artifacts should be different";
- assertFalse(msg, new String(artifact1).equals(new String(artifact2)));
- assertFalse(msg, new String(artifact1).equals(new String(artifact3)));
- assertFalse(msg, new String(artifact3).equals(new String(artifact2)));
- }
-
-
-}