aboutsummaryrefslogtreecommitdiffstats
path: root/model/policy-model
diff options
context:
space:
mode:
authorJvD_Ericsson <jeff.van.dam@est.tech>2020-07-23 12:59:30 +0100
committerJvD_Ericsson <jeff.van.dam@est.tech>2020-07-23 15:03:01 +0100
commit9c4fb1da445dd94b4dac8025af81f196a47699e9 (patch)
tree7022017ce2af6a3721ba558f60be3b575a2471d2 /model/policy-model
parent67ee67bd0da0d2d16abb982e26a3d48ba031a7e8 (diff)
Fix assertTrue in apex-pdp/model
Replace assertTrue with assertEquals and assertFalse with assertNotEquals in apex-pdp/model Issue-ID: POLICY-2690 Change-Id: Ifd435a4ea69d8f682407c2a70d5e8119f017ae9f Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
Diffstat (limited to 'model/policy-model')
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java37
1 files changed, 18 insertions, 19 deletions
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java
index 17601c878..4f19e6100 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java
@@ -22,7 +22,6 @@
package org.onap.policy.apex.model.policymodel.concepts;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -219,19 +218,19 @@ public class TasksTest {
final AxTask clonedTask = new AxTask(task);
assertEquals("AxTask:(key=AxArtifactKey:(name=TaskName", clonedTask.toString().substring(0, 40));
- assertFalse(task.hashCode() == 0);
+ assertNotEquals(0, task.hashCode());
- assertTrue(task.equals(task));
- assertTrue(task.equals(clonedTask));
- assertFalse(task.equals(null));
- assertFalse(task.equals((Object) "Hello"));
- assertFalse(task.equals(new AxTask(new AxArtifactKey(), ifMap, ofMap, tpMap, ctxtSet, tl)));
- assertFalse(task.equals(new AxTask(taskKey, ifEmptyMap, ofMap, tpMap, ctxtSet, tl)));
- assertFalse(task.equals(new AxTask(taskKey, ifMap, ofEmptyMap, tpMap, ctxtSet, tl)));
- assertFalse(task.equals(new AxTask(taskKey, ifMap, ofMap, tpEmptyMap, ctxtSet, tl)));
- assertFalse(task.equals(new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtEmptySet, tl)));
- assertFalse(task.equals(new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, new AxTaskLogic())));
- assertTrue(task.equals(new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, tl)));
+ assertEquals(task, task);
+ assertEquals(task, clonedTask);
+ assertNotNull(task);
+ assertNotEquals(task, (Object) "Hello");
+ assertNotEquals(task, new AxTask(new AxArtifactKey(), ifMap, ofMap, tpMap, ctxtSet, tl));
+ assertNotEquals(task, new AxTask(taskKey, ifEmptyMap, ofMap, tpMap, ctxtSet, tl));
+ assertNotEquals(task, new AxTask(taskKey, ifMap, ofEmptyMap, tpMap, ctxtSet, tl));
+ assertNotEquals(task, new AxTask(taskKey, ifMap, ofMap, tpEmptyMap, ctxtSet, tl));
+ assertNotEquals(task, new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtEmptySet, tl));
+ assertNotEquals(task, new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, new AxTaskLogic()));
+ assertEquals(task, new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, tl));
assertEquals(0, task.compareTo(task));
assertEquals(0, task.compareTo(clonedTask));
@@ -302,13 +301,13 @@ public class TasksTest {
assertEquals("AxTasks:(key=AxArtifactKey:(name=TasksKey,version=0.0.1),tas",
clonedTasks.toString().substring(0, 60));
- assertFalse(tasks.hashCode() == 0);
+ assertNotEquals(0, tasks.hashCode());
- assertTrue(tasks.equals(tasks));
- assertTrue(tasks.equals(clonedTasks));
- assertFalse(tasks.equals(null));
- assertFalse(tasks.equals((Object) "Hello"));
- assertFalse(tasks.equals(new AxTasks(new AxArtifactKey())));
+ assertEquals(tasks, tasks);
+ assertEquals(tasks, clonedTasks);
+ assertNotNull(tasks);
+ assertNotEquals(tasks, (Object) "Hello");
+ assertNotEquals(tasks, new AxTasks(new AxArtifactKey()));
assertEquals(0, tasks.compareTo(tasks));
assertEquals(0, tasks.compareTo(clonedTasks));