summaryrefslogtreecommitdiffstats
path: root/model/utilities/src
diff options
context:
space:
mode:
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());