summaryrefslogtreecommitdiffstats
path: root/examples/examples-myfirstpolicy/src
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2020-07-14 15:17:25 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-14 15:17:25 +0000
commit592e04f6301dd38ae48d38501cc251fc3d5ad2fb (patch)
treef2e2abc1a89a51ee348a3aee5fa2f87c9ffb4f5a /examples/examples-myfirstpolicy/src
parent9a306c4444ca86f409d40b2e032ab2a12f3031ff (diff)
parentaa987aab348f13d477c6cf32e61689d396ebfba5 (diff)
Merge "Fix assertTrue SONAR issues in apex-pdp/examples and apex-pdp/model"
Diffstat (limited to 'examples/examples-myfirstpolicy/src')
-rw-r--r--examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/MfpUseCaseTest.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/MfpUseCaseTest.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/MfpUseCaseTest.java
index c495bd32b..8afe7d7cd 100644
--- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/MfpUseCaseTest.java
+++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/MfpUseCaseTest.java
@@ -308,12 +308,12 @@ public class MfpUseCaseTest {
gb.create().fromJson(ResourceUtils.getResourceAsString(inputFile), JsonObject.class);
assertNotNull(jsonObject);
assertTrue(jsonObject.has("name"));
- assertTrue(ret.getName().equals(jsonObject.get("name").getAsString()));
- assertTrue(ret.getAxEvent().getKey().getName().equals(jsonObject.get("name").getAsString()));
+ assertEquals(ret.getName(), jsonObject.get("name").getAsString());
+ assertEquals(ret.getAxEvent().getKey().getName(), jsonObject.get("name").getAsString());
assertTrue(jsonObject.has("nameSpace"));
- assertTrue(ret.getAxEvent().getNameSpace().equals(jsonObject.get("nameSpace").getAsString()));
+ assertEquals(ret.getAxEvent().getNameSpace(), jsonObject.get("nameSpace").getAsString());
assertTrue(jsonObject.has("version"));
- assertTrue(ret.getAxEvent().getKey().getVersion().equals(jsonObject.get("version").getAsString()));
+ assertEquals(ret.getAxEvent().getKey().getVersion(), jsonObject.get("version").getAsString());
final List<String> reserved = Arrays.asList("name", "nameSpace", "version", "source", "target");
for (final Map.Entry<String, ?> e : jsonObject.entrySet()) {
if (reserved.contains(e.getKey())) {
@@ -375,12 +375,12 @@ public class MfpUseCaseTest {
gb.create().fromJson(ResourceUtils.getResourceAsString(inputFile), JsonObject.class);
assertNotNull(jsonObject);
assertTrue(jsonObject.has("name"));
- assertTrue(ret.getName().equals(jsonObject.get("name").getAsString()));
- assertTrue(ret.getAxEvent().getKey().getName().equals(jsonObject.get("name").getAsString()));
+ assertEquals(ret.getName(), jsonObject.get("name").getAsString());
+ assertEquals(ret.getAxEvent().getKey().getName(), jsonObject.get("name").getAsString());
assertTrue(jsonObject.has("nameSpace"));
- assertTrue(ret.getAxEvent().getNameSpace().equals(jsonObject.get("nameSpace").getAsString()));
+ assertEquals(ret.getAxEvent().getNameSpace(), jsonObject.get("nameSpace").getAsString());
assertTrue(jsonObject.has("version"));
- assertTrue(ret.getAxEvent().getKey().getVersion().equals(jsonObject.get("version").getAsString()));
+ assertEquals(ret.getAxEvent().getKey().getVersion(), jsonObject.get("version").getAsString());
final List<String> reserved = Arrays.asList("name", "nameSpace", "version", "source", "target");
for (final Map.Entry<String, ?> e : jsonObject.entrySet()) {
if (reserved.contains(e.getKey())) {