summaryrefslogtreecommitdiffstats
path: root/model/policy-model/src/test/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-07-23 15:46:31 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-23 15:46:31 +0000
commitba58c5bad6075f7bc902de80190cc6770a209bb6 (patch)
tree5088ae79873724e41751e21eb5ef7d25e5fc2f4c /model/policy-model/src/test/java
parent3b918bdd862e44a1532704413bfc05adb42997a3 (diff)
parent9c4fb1da445dd94b4dac8025af81f196a47699e9 (diff)
Merge "Fix assertTrue in apex-pdp/model"
Diffstat (limited to 'model/policy-model/src/test/java')
-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));