From 0236a88fb454682608c28f7c21716d9288b56bec Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Mon, 3 Mar 2014 09:38:27 +0100 Subject: added tweaked stork2-commons source --- .../stork/peps/tests/AttributeSourceTestCase.java | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java (limited to 'id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java') diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java new file mode 100644 index 000000000..31cabb612 --- /dev/null +++ b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java @@ -0,0 +1,88 @@ +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.AttributeSource; +import eu.stork.peps.auth.commons.Country; + +/** + * The AttributeSource's Test Case. + * + * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) + * + * @version $Revision: $, $Date: $ + */ +public final class AttributeSourceTestCase { + private AttributeSource ap1 = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL1"); + private AttributeSource ap2 = new AttributeSource(new AttributeProvider("ID2", "Name 2"), "URL2"); + private AttributeSource ap3 = new AttributeSource(new AttributeProvider("ID1", "Name 2"), "URL2"); + private AttributeSource ap4 = new AttributeSource(new AttributeProvider("ID1", "Name 2"), "URL1"); + private AttributeSource ap5 = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL1"); + + private AttributeSource c1 = new AttributeSource(new Country("ID1", "Name 1"), "URL1"); + private AttributeSource c2 = new AttributeSource(new Country("ID2", "Name 2"), "URL2"); + private AttributeSource c3 = new AttributeSource(new Country("ID1", "Name 2"), "URL2"); + private AttributeSource c4 = new AttributeSource(new Country("ID1", "Name 2"), "URL1"); + private AttributeSource c5 = new AttributeSource(new Country("ID1", "Name 1"), "URL1"); + + @Test + public void testNotEquals1() { + assertFalse(ap1.equals(ap2)); + } + + @Test + public void testNotEquals2() { + assertFalse(ap1.equals(c1)); + } + + @Test + public void testNotEquals3() { + assertFalse(c1.equals(c2)); + } + + @Test + public void testEquals1() { + assertTrue(ap1.equals(ap3)); + } + + @Test + public void testEquals2() { + assertTrue(ap1.equals(ap4)); + } + + @Test + public void testEquals3() { + assertTrue(ap1.equals(ap5)); + } + + @Test + public void testEquals4() { + assertTrue(c1.equals(c3)); + } + + @Test + public void testEquals5() { + assertTrue(c1.equals(c4)); + } + + @Test + public void testEquals6() { + assertTrue(c1.equals(c5)); + } + + @Test + public void testEquals7() { + Object obj = ap5; + assertTrue(ap1.equals(obj)); + } + + @Test + public void testEquals8() { + Object obj = c5; + assertTrue(c1.equals(obj)); + } +} -- cgit v1.2.3 From 0b3249e37b26e029c576127654dca31bff4a5a63 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Mon, 17 Mar 2014 18:23:52 +0100 Subject: removing old samlengine and storkcommons --- .../stork/peps/tests/AttributeSourceTestCase.java | 88 ---------------------- 1 file changed, 88 deletions(-) delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java (limited to 'id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java') diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java deleted file mode 100644 index 31cabb612..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java +++ /dev/null @@ -1,88 +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.AttributeSource; -import eu.stork.peps.auth.commons.Country; - -/** - * The AttributeSource's Test Case. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: $, $Date: $ - */ -public final class AttributeSourceTestCase { - private AttributeSource ap1 = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL1"); - private AttributeSource ap2 = new AttributeSource(new AttributeProvider("ID2", "Name 2"), "URL2"); - private AttributeSource ap3 = new AttributeSource(new AttributeProvider("ID1", "Name 2"), "URL2"); - private AttributeSource ap4 = new AttributeSource(new AttributeProvider("ID1", "Name 2"), "URL1"); - private AttributeSource ap5 = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL1"); - - private AttributeSource c1 = new AttributeSource(new Country("ID1", "Name 1"), "URL1"); - private AttributeSource c2 = new AttributeSource(new Country("ID2", "Name 2"), "URL2"); - private AttributeSource c3 = new AttributeSource(new Country("ID1", "Name 2"), "URL2"); - private AttributeSource c4 = new AttributeSource(new Country("ID1", "Name 2"), "URL1"); - private AttributeSource c5 = new AttributeSource(new Country("ID1", "Name 1"), "URL1"); - - @Test - public void testNotEquals1() { - assertFalse(ap1.equals(ap2)); - } - - @Test - public void testNotEquals2() { - assertFalse(ap1.equals(c1)); - } - - @Test - public void testNotEquals3() { - assertFalse(c1.equals(c2)); - } - - @Test - public void testEquals1() { - assertTrue(ap1.equals(ap3)); - } - - @Test - public void testEquals2() { - assertTrue(ap1.equals(ap4)); - } - - @Test - public void testEquals3() { - assertTrue(ap1.equals(ap5)); - } - - @Test - public void testEquals4() { - assertTrue(c1.equals(c3)); - } - - @Test - public void testEquals5() { - assertTrue(c1.equals(c4)); - } - - @Test - public void testEquals6() { - assertTrue(c1.equals(c5)); - } - - @Test - public void testEquals7() { - Object obj = ap5; - assertTrue(ap1.equals(obj)); - } - - @Test - public void testEquals8() { - Object obj = c5; - assertTrue(c1.equals(obj)); - } -} -- cgit v1.2.3 From e6144cfe09bb148638911660eeb492fee7ab8079 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 20 Mar 2014 11:43:22 +0100 Subject: fixed serializable issues in stork2-commons --- .../stork/peps/tests/AttributeSourceTestCase.java | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java (limited to 'id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java') diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java new file mode 100644 index 000000000..e0f685ade --- /dev/null +++ b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java @@ -0,0 +1,88 @@ +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.AttributeSource; +import eu.stork.peps.auth.commons.Country; + +/** + * The AttributeSource's Test Case. + * + * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) + * + * @version $Revision: $, $Date: $ + */ +public final class AttributeSourceTestCase { + private final AttributeSource ap1 = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL1"); + private final AttributeSource ap2 = new AttributeSource(new AttributeProvider("ID2", "Name 2", null), "URL2"); + private final AttributeSource ap3 = new AttributeSource(new AttributeProvider("ID1", "Name 2", null), "URL2"); + private final AttributeSource ap4 = new AttributeSource(new AttributeProvider("ID1", "Name 2", null), "URL1"); + private final AttributeSource ap5 = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL1"); + + private final AttributeSource c1 = new AttributeSource(new Country("ID1", "Name 1"), "URL1"); + private final AttributeSource c2 = new AttributeSource(new Country("ID2", "Name 2"), "URL2"); + private final AttributeSource c3 = new AttributeSource(new Country("ID1", "Name 2"), "URL2"); + private final AttributeSource c4 = new AttributeSource(new Country("ID1", "Name 2"), "URL1"); + private final AttributeSource c5 = new AttributeSource(new Country("ID1", "Name 1"), "URL1"); + + @Test + public void testNotEquals1() { + assertFalse(ap1.equals(ap2)); + } + + @Test + public void testNotEquals2() { + assertFalse(ap1.equals(c1)); + } + + @Test + public void testNotEquals3() { + assertFalse(c1.equals(c2)); + } + + @Test + public void testEquals1() { + assertTrue(ap1.equals(ap3)); + } + + @Test + public void testEquals2() { + assertTrue(ap1.equals(ap4)); + } + + @Test + public void testEquals3() { + assertTrue(ap1.equals(ap5)); + } + + @Test + public void testEquals4() { + assertTrue(c1.equals(c3)); + } + + @Test + public void testEquals5() { + assertTrue(c1.equals(c4)); + } + + @Test + public void testEquals6() { + assertTrue(c1.equals(c5)); + } + + @Test + public void testEquals7() { + final Object obj = ap5; + assertTrue(ap1.equals(obj)); + } + + @Test + public void testEquals8() { + final Object obj = c5; + assertTrue(c1.equals(obj)); + } +} -- cgit v1.2.3