From 07c6114a266a67abd404bac8703c1a17e035d69d Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 17 Feb 2016 07:00:09 +0100 Subject: remove STORK code --> MOA-ID >= 3.2 only supports eIDAS protocol --- .../peps/tests/AttributeProvidersMapTestCase.java | 135 --------------------- 1 file changed, 135 deletions(-) delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java (limited to 'id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java') 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 3d0aa4d45..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java +++ /dev/null @@ -1,135 +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() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final 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() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final 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() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final AttributeSource target = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final 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() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final AttributeSource target = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final 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() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final AttributeSource target = new AttributeSource(new Country("ID1", "Name 1"), "URL"); - final 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() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final AttributeSource target = new AttributeSource(new AttributeProvider("ID2", "Name 1", null), "URL"); - final IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if (map.containsKey(target)) { - outcome = true; - } - - assertFalse(outcome); - } -} -- cgit v1.2.3