aboutsummaryrefslogtreecommitdiff
path: root/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java
diff options
context:
space:
mode:
authorBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-03-17 18:23:52 +0100
committerBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-03-17 18:23:52 +0100
commit0b3249e37b26e029c576127654dca31bff4a5a63 (patch)
treefb4b0ce3d24928ccb4052f44ced7135ddc480028 /id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java
parent60ac2a89fce86eb1e8344eb22535cfdd0b9aa147 (diff)
downloadmoa-id-spss-0b3249e37b26e029c576127654dca31bff4a5a63.tar.gz
moa-id-spss-0b3249e37b26e029c576127654dca31bff4a5a63.tar.bz2
moa-id-spss-0b3249e37b26e029c576127654dca31bff4a5a63.zip
removing old samlengine and storkcommons
Diffstat (limited to 'id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java')
-rw-r--r--id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java134
1 files changed, 0 insertions, 134 deletions
diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java
deleted file mode 100644
index 2e8cc2e62..000000000
--- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package eu.stork.peps.tests;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-import eu.stork.peps.auth.commons.AttributeProvider;
-import eu.stork.peps.auth.commons.AttributeProvidersMap;
-import eu.stork.peps.auth.commons.AttributeSource;
-import eu.stork.peps.auth.commons.Country;
-import eu.stork.peps.auth.commons.IAttributeProvidersMap;
-import eu.stork.peps.auth.commons.IPersonalAttributeList;
-import eu.stork.peps.auth.commons.PersonalAttributeList;
-
-/**
- * The AttributeSource's Test Case.
- *
- * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr)
- *
- * @version $Revision: $, $Date: $
- */
-public class AttributeProvidersMapTestCase {
-
- @Test
- public void testObjectOK1() {
- IAttributeProvidersMap map = new AttributeProvidersMap();
- AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL");
- IPersonalAttributeList pal = new PersonalAttributeList();
- boolean outcome = false;
-
- //Add a single item
- map.put(source, pal);
-
- if ( map.containsKey(source) ) {
- outcome = true;
- }
-
- assertTrue(outcome);
- }
-
- @Test
- public void testObjectOK2() {
- IAttributeProvidersMap map = new AttributeProvidersMap();
- AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL");
- IPersonalAttributeList pal = new PersonalAttributeList();
- boolean outcome = false;
-
- //Add a single item
- map.put(source, pal);
-
- if ( map.containsKey(source) ) {
- if ( map.get(source)!=null ) {
- outcome = true;
- }
- }
-
- assertTrue(outcome);
- }
-
- @Test
- public void testObjectOK3() {
- IAttributeProvidersMap map = new AttributeProvidersMap();
- AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL");
- AttributeSource target = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL");
- IPersonalAttributeList pal = new PersonalAttributeList();
- boolean outcome = false;
-
- //Add a single item
- map.put(source, pal);
-
- if ( map.containsKey(target) ) {
- outcome = true;
- }
-
- assertTrue(outcome);
- }
-
- @Test
- public void testObjectOK4() {
- IAttributeProvidersMap map = new AttributeProvidersMap();
- AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL");
- AttributeSource target = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL");
- IPersonalAttributeList pal = new PersonalAttributeList();
- boolean outcome = false;
-
- //Add a single item
- map.put(source, pal);
-
- if ( map.containsKey(target) ) {
- if ( map.get(target)!=null ) {
- outcome = true;
- }
- }
-
- assertTrue(outcome);
- }
-
- @Test
- public void testObjectNOK1() {
- IAttributeProvidersMap map = new AttributeProvidersMap();
- AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL");
- AttributeSource target = new AttributeSource(new Country("ID1", "Name 1"), "URL");
- IPersonalAttributeList pal = new PersonalAttributeList();
- boolean outcome = false;
-
- //Add a single item
- map.put(source, pal);
-
- if ( map.containsKey(target) ) {
- outcome = true;
- }
-
- assertFalse(outcome);
- }
-
- @Test
- public void testObjectNOK2() {
- IAttributeProvidersMap map = new AttributeProvidersMap();
- AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL");
- AttributeSource target = new AttributeSource(new AttributeProvider("ID2", "Name 1"), "URL");
- IPersonalAttributeList pal = new PersonalAttributeList();
- boolean outcome = false;
-
- //Add a single item
- map.put(source, pal);
-
- if ( map.containsKey(target) ) {
- outcome = true;
- }
-
- assertFalse(outcome);
- }
-}