From 1b9f8877186932d84c5ed4405aa0d73242d33cdf Mon Sep 17 00:00:00 2001 From: SravanKumarGunda Date: Tue, 4 Aug 2020 21:02:32 +0530 Subject: code improvements-sonar fixes Signed-off-by: SravanKumarGunda Issue-ID: CLI-270 Change-Id: I3f663df51e27e7295f9cad51ace100d784ab94bb --- .../src/test/java/org/onap/cli/fw/schema/ValidateSchemaTest.java | 4 ++-- .../src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'framework/src/test') diff --git a/framework/src/test/java/org/onap/cli/fw/schema/ValidateSchemaTest.java b/framework/src/test/java/org/onap/cli/fw/schema/ValidateSchemaTest.java index 6d9b2d2c..507490c6 100644 --- a/framework/src/test/java/org/onap/cli/fw/schema/ValidateSchemaTest.java +++ b/framework/src/test/java/org/onap/cli/fw/schema/ValidateSchemaTest.java @@ -154,7 +154,7 @@ public class ValidateSchemaTest { paraValues.put("is_default_param","yes"); list.add(paraValues); values.put("parameters",list); - assertTrue(OnapCommandSchemaLoader.parseSchema(cmd,values,true).size()==2); + assertEquals(2, OnapCommandSchemaLoader.parseSchema(cmd,values,true).size()); } @Test @@ -172,7 +172,7 @@ public class ValidateSchemaTest { list.add(paraValues); attributesValues.put("attributes",list); values.put("results",attributesValues); - assertTrue(OnapCommandSchemaLoader.parseSchema(cmd,values,true).size()==2); + assertEquals(2, OnapCommandSchemaLoader.parseSchema(cmd,values,true).size()); } } diff --git a/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java b/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java index 44c18194..e5fa45b7 100644 --- a/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java +++ b/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java @@ -546,8 +546,8 @@ public class OnapCommandUtilsTest { mapExample.put("key1", "paramA"); mapExample.put("key2", "paramB"); OnapCommandUtils.replaceLineFromResults("line $r{paramA} line $r{paramB}", mapExample); - assertTrue(mapExample.get("key1").equals("paramA")); - assertTrue(mapExample.get("key2").equals("paramB")); + assertEquals("paramA", mapExample.get("key1")); + assertEquals("paramB", mapExample.get("key2")); } @Test -- cgit 1.2.3-korg