From 2073da6514668ce17e7359900439354fb3432f4e Mon Sep 17 00:00:00 2001 From: sharath reddy Date: Fri, 25 Mar 2022 12:44:19 +0530 Subject: Fixed Sonar Bug and Code Smell Blockers Issue-ID: CLI-439 Signed-off-by: sharath reddy Change-Id: I81bd79661ab7c6b1152fa481d9273a86e77b4f3a Signed-off-by: sharath reddy --- .../src/test/java/org/onap/cli/fw/conf/OnapCommandConfgTest.java | 4 ++-- .../test/java/org/onap/cli/fw/store/OnapCommandProfileStoreTest.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'framework/src/test/java/org') diff --git a/framework/src/test/java/org/onap/cli/fw/conf/OnapCommandConfgTest.java b/framework/src/test/java/org/onap/cli/fw/conf/OnapCommandConfgTest.java index ae620632..aa6da880 100644 --- a/framework/src/test/java/org/onap/cli/fw/conf/OnapCommandConfgTest.java +++ b/framework/src/test/java/org/onap/cli/fw/conf/OnapCommandConfgTest.java @@ -17,13 +17,13 @@ package org.onap.cli.fw.conf; import org.junit.Test; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; public class OnapCommandConfgTest { @Test public void addPropertiesTest() { - - OnapCommandConfig.getPropertyValue("cli.schema.profile.confs"); + assertDoesNotThrow(() -> OnapCommandConfig.getPropertyValue("cli.schema.profile.confs")); } } diff --git a/framework/src/test/java/org/onap/cli/fw/store/OnapCommandProfileStoreTest.java b/framework/src/test/java/org/onap/cli/fw/store/OnapCommandProfileStoreTest.java index 18657c7d..86e0a3f9 100644 --- a/framework/src/test/java/org/onap/cli/fw/store/OnapCommandProfileStoreTest.java +++ b/framework/src/test/java/org/onap/cli/fw/store/OnapCommandProfileStoreTest.java @@ -29,6 +29,7 @@ import java.util.List; import static org.junit.Assert.*; import java.io.IOException; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; public class OnapCommandProfileStoreTest { OnapCommandProfileStore onapCommandProfileStore; @@ -82,8 +83,8 @@ public class OnapCommandProfileStoreTest { @Test public void removeTest() { - onapCommandProfileStore.add("abc", "abc", "abc"); - onapCommandProfileStore.remove("abc","abc"); + assertDoesNotThrow(() -> onapCommandProfileStore.add("abc", "abc", "abc")); + assertDoesNotThrow(() -> onapCommandProfileStore.remove("abc","abc")); } @AfterClass -- cgit 1.2.3-korg