summaryrefslogtreecommitdiffstats
path: root/main/src/test/java
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2020-06-18 13:23:17 -0400
committerTaka Cho <takamune.cho@att.com>2020-06-18 13:24:26 -0400
commit2fe32306ec44899a5c8102c46d54e53552b9b003 (patch)
tree98d6de4a7d9a584f82e84c1210a2b461a8ff402b /main/src/test/java
parent5cfff2b468a13e7b5ce068e58e899fcfe36537b3 (diff)
pap - sonar issue fix
replace by assertNotSame Issue-ID: POLICY-2616 Change-Id: I927dbd8c57654cd2d2ef6262d13d63c79ba9035f Signed-off-by: Taka Cho <takamune.cho@att.com>
Diffstat (limited to 'main/src/test/java')
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/comm/msgdata/RequestImplTest.java7
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/notification/PolicyCommonTrackerTest.java3
2 files changed, 6 insertions, 4 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/comm/msgdata/RequestImplTest.java b/main/src/test/java/org/onap/policy/pap/main/comm/msgdata/RequestImplTest.java
index 414c1dbb..d57f667f 100644
--- a/main/src/test/java/org/onap/policy/pap/main/comm/msgdata/RequestImplTest.java
+++ b/main/src/test/java/org/onap/policy/pap/main/comm/msgdata/RequestImplTest.java
@@ -27,6 +27,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
@@ -219,7 +220,7 @@ public class RequestImplTest extends CommonRequestBase {
req.startPublishing();
QueueToken<PdpMessage> token2 = queue.poll();
assertNotNull(token2);
- assertTrue(token2 != token);
+ assertNotSame(token, token2);
assertSame(msg, token2.get());
}
@@ -247,7 +248,7 @@ public class RequestImplTest extends CommonRequestBase {
// a new token should have been placed in the queue
QueueToken<PdpMessage> token2 = queue.poll();
- assertTrue(token != token2);
+ assertNotSame(token, token2);
assertNull(queue.poll());
assertNotNull(token2);
assertSame(msg3, token2.get());
@@ -259,7 +260,7 @@ public class RequestImplTest extends CommonRequestBase {
// a new token should have been placed in the queue
QueueToken<PdpMessage> token3 = queue.poll();
- assertTrue(token2 != token3);
+ assertNotSame(token2, token3);
assertNull(queue.poll());
assertNotNull(token3);
assertSame(msg4, token3.get());
diff --git a/main/src/test/java/org/onap/policy/pap/main/notification/PolicyCommonTrackerTest.java b/main/src/test/java/org/onap/policy/pap/main/notification/PolicyCommonTrackerTest.java
index fc43c7a9..34d4db60 100644
--- a/main/src/test/java/org/onap/policy/pap/main/notification/PolicyCommonTrackerTest.java
+++ b/main/src/test/java/org/onap/policy/pap/main/notification/PolicyCommonTrackerTest.java
@@ -23,6 +23,7 @@ package org.onap.policy.pap.main.notification;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
@@ -126,7 +127,7 @@ public class PolicyCommonTrackerTest extends PolicyCommonSupport {
assertFalse(data.isComplete());
// policy 2 should have its own data
- assertTrue(map.get(policy2) != data);
+ assertNotSame(data, map.get(policy2));
data = map.get(policy2);
assertNotNull(data);
assertFalse(data.isComplete());