aboutsummaryrefslogtreecommitdiff
path: root/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/AttributeSourceTestCase.java.svn-base
diff options
context:
space:
mode:
authorBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-03-05 21:27:55 +0100
committerBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-03-05 21:27:55 +0100
commitd828b0b377a1bd61a04f0886c9d24aa1eb19c025 (patch)
treeac7f578e5cf6f4840eb5c6f662b3b6cf96a6a40e /id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/AttributeSourceTestCase.java.svn-base
parent0499a41a86a6b44092eb6ad356858cd36a3d19c0 (diff)
parent19e164874ea92d51f9df12f56047d77db9683091 (diff)
downloadmoa-id-spss-d828b0b377a1bd61a04f0886c9d24aa1eb19c025.tar.gz
moa-id-spss-d828b0b377a1bd61a04f0886c9d24aa1eb19c025.tar.bz2
moa-id-spss-d828b0b377a1bd61a04f0886c9d24aa1eb19c025.zip
Merge branch 'moa2_0_tlenz_bs_3' into moa2_0_tlenz_bs_3_ar
Conflicts: id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKAuthnRequest.java
Diffstat (limited to 'id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/AttributeSourceTestCase.java.svn-base')
-rw-r--r--id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/AttributeSourceTestCase.java.svn-base88
1 files changed, 88 insertions, 0 deletions
diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/AttributeSourceTestCase.java.svn-base b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/AttributeSourceTestCase.java.svn-base
new file mode 100644
index 000000000..31cabb612
--- /dev/null
+++ b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/.svn/text-base/AttributeSourceTestCase.java.svn-base
@@ -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));
+ }
+}