summaryrefslogtreecommitdiffstats
path: root/policy-management
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2020-07-02 11:56:18 -0400
committerTaka Cho <takamune.cho@att.com>2020-07-02 12:34:49 -0400
commit427cbbb9e25f843bcf06d75904f6294ac07180be (patch)
tree46f4abb3a5be369874567bab0016102c6c7bc678 /policy-management
parent11fe26a917bdd6aa54aa40cb21396df824410d83 (diff)
drools-pdp sonar fix
most of changes are assert statement Issue-ID: POLICY-2616 Change-Id: I3bd3076115d28d8cfabcbe0859cc4b21085e1394 Signed-off-by: Taka Cho <takamune.cho@att.com>
Diffstat (limited to 'policy-management')
-rw-r--r--policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java6
-rw-r--r--policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java
index 7a5ed2c0..6b497fa3 100644
--- a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java
+++ b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java
@@ -176,9 +176,9 @@ public class ProtocolCoderToolsetTest {
tripleDecoded = (Triple<String, String, String>) coderToolset.decode(tripleEncoded);
- Assert.assertTrue(tripleDecoded.first().equals(triple.first()));
- Assert.assertTrue(tripleDecoded.second().equals(triple.second()));
- Assert.assertTrue(tripleDecoded.third().equals(triple.third()));
+ Assert.assertEquals(tripleDecoded.first(), triple.first());
+ Assert.assertEquals(tripleDecoded.second(), triple.second());
+ Assert.assertEquals(tripleDecoded.third(), triple.third());
coderFilters.getFilter().setRule("[?($.third =~ /.*v3.*/)]");
}
diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java
index a999c718..f4876a95 100644
--- a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java
+++ b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java
@@ -519,7 +519,7 @@ public class PolicyEngineManagerTest {
verify(prov1).beforeConfigure(mgr, properties);
verify(prov2).beforeConfigure(mgr, properties);
- assertTrue(mgr.getProperties() == properties);
+ assertSame(properties, mgr.getProperties());
assertEquals(sources, mgr.getSources());
assertEquals(sinks, mgr.getSinks());
@@ -553,7 +553,7 @@ public class PolicyEngineManagerTest {
(prov, flag) -> when(prov.afterConfigure(mgr)).thenReturn(flag),
() -> mgr.configure(properties),
prov -> verify(prov).beforeConfigure(mgr, properties),
- () -> assertTrue(mgr.getProperties() == properties),
+ () -> assertSame(properties, mgr.getProperties()),
prov -> verify(prov).afterConfigure(mgr));
}