aboutsummaryrefslogtreecommitdiffstats
path: root/model/utilities/src
diff options
context:
space:
mode:
authorJvD_Ericsson <jeff.van.dam@est.tech>2020-07-17 14:08:52 +0100
committerJvD_Ericsson <jeff.van.dam@est.tech>2020-07-21 15:35:05 +0100
commit53b9324d6ec14ef75dc1f943c19b3ea1a46bc8ab (patch)
treea0fa4cd006a10b4a2ea8a57194bf44d75f51d973 /model/utilities/src
parentcb4b9a2e27266c03fa6aa82165608999bf21e36a (diff)
Fix assertTrue in apex-pdp/model apex-pdp/plugins, apex-pdp/services and apex-pdp/testsuites
Replace assertTrue with assertEquals and assertFalse with assertNotEquals in apex-pdp/model, apex-pdp/plugins, apex-pdp/services and apex-pdp/testsuites Issue-ID: POLICY-2690 Change-Id: If088371cf012d5648e04ade2aa4d49b38945f6d2 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
Diffstat (limited to 'model/utilities/src')
-rw-r--r--model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyComparerTest.java14
-rw-r--r--model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyedMapComparerTest.java3
2 files changed, 8 insertions, 9 deletions
diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyComparerTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyComparerTest.java
index 4cf91bd39..20780b271 100644
--- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyComparerTest.java
+++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyComparerTest.java
@@ -21,8 +21,8 @@
package org.onap.policy.apex.model.utilities;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.onap.policy.apex.model.utilities.comparison.KeyComparer;
@@ -40,14 +40,14 @@ public class KeyComparerTest {
KeyDifference<String> keyDifference = new KeyComparer<String>().compareKeys("Hello", "Goodbye");
assertFalse(keyDifference.isEqual());
- assertTrue("Hello".equals(keyDifference.getLeftKey().toString()));
- assertTrue("Goodbye".equals(keyDifference.getRightKey().toString()));
+ assertEquals("Hello", keyDifference.getLeftKey().toString());
+ assertEquals("Goodbye", keyDifference.getRightKey().toString());
- assertTrue("left key Hello and right key Goodbye differ\n".equals(keyDifference.asString(true)));
- assertTrue("left key Hello and right key Goodbye differ\n".equals(keyDifference.asString(false)));
+ assertEquals("left key Hello and right key Goodbye differ\n", keyDifference.asString(true));
+ assertEquals("left key Hello and right key Goodbye differ\n", keyDifference.asString(false));
KeyDifference<String> keyDifference2 = new KeyComparer<String>().compareKeys("Here", "Here");
- assertTrue("".equals(keyDifference2.asString(true)));
- assertTrue("left key Here equals right key Here\n".equals(keyDifference2.asString(false)));
+ assertEquals("", keyDifference2.asString(true));
+ assertEquals("left key Here equals right key Here\n", keyDifference2.asString(false));
}
}
diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyedMapComparerTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyedMapComparerTest.java
index fb993b10f..b4e88e20d 100644
--- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyedMapComparerTest.java
+++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyedMapComparerTest.java
@@ -23,7 +23,6 @@ package org.onap.policy.apex.model.utilities;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import java.util.TreeMap;
import org.junit.Test;
@@ -58,7 +57,7 @@ public class KeyedMapComparerTest {
KeyedMapDifference<String, String> kmComparedDiff =
new KeyedMapComparer<String, String>().compareMaps(leftMap, rightMap);
- assertTrue(kmComparedSame.getIdenticalValues().equals(leftMap));
+ assertEquals(leftMap, kmComparedSame.getIdenticalValues());
assertEquals(1, kmComparedDiff.getLeftOnly().size());
assertEquals(3, kmComparedDiff.getRightOnly().size());
assertEquals(2, kmComparedDiff.getDifferentValues().size());