aboutsummaryrefslogtreecommitdiff
path: root/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2015-08-10 16:52:00 +0200
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2015-08-10 16:53:53 +0200
commit2b8c631a8ef6d6970a482914e41c59f37e3a6d08 (patch)
treea81b4c3247d1c65a3a9992f787511a5a0579e519 /id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java
parent496ba9bb6e150ad67c5c628c1c97f30d6da81dfb (diff)
downloadmoa-id-spss-2b8c631a8ef6d6970a482914e41c59f37e3a6d08.tar.gz
moa-id-spss-2b8c631a8ef6d6970a482914e41c59f37e3a6d08.tar.bz2
moa-id-spss-2b8c631a8ef6d6970a482914e41c59f37e3a6d08.zip
approved tests
Diffstat (limited to 'id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java')
-rw-r--r--id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java144
1 files changed, 73 insertions, 71 deletions
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
index e0f685ade..a3fb6468f 100644
--- 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
@@ -11,78 +11,80 @@ import eu.stork.peps.auth.commons.Country;
/**
* The AttributeSource's Test Case.
- *
- * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr)
- *
+ *
+ * @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));
- }
+
+ 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.innerEquals(ap2));
+ }
+
+ @Test
+ public void testNotEquals2() {
+ assertFalse(ap1.innerEquals(c1));
+ }
+
+ @Test
+ public void testNotEquals3() {
+ assertFalse(c1.innerEquals(c2));
+ }
+
+ @Test
+ public void testEquals1() {
+ assertTrue(ap1.innerEquals(ap3));
+ }
+
+ @Test
+ public void testEquals2() {
+ assertTrue(ap1.innerEquals(ap4));
+ }
+
+ @Test
+ public void testEquals3() {
+ assertTrue(ap1.innerEquals(ap5));
+ }
+
+ @Test
+ public void testEquals4() {
+ assertTrue(c1.innerEquals(c3));
+ }
+
+ @Test
+ public void testEquals5() {
+ assertTrue(c1.innerEquals(c4));
+ }
+
+ @Test
+ public void testEquals6() {
+ assertTrue(c1.innerEquals(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));
+ }
}