diff options
author | 2022-03-25 12:44:19 +0530 | |
---|---|---|
committer | 2022-03-25 13:19:08 +0530 | |
commit | 2073da6514668ce17e7359900439354fb3432f4e (patch) | |
tree | 582571835a61daec0bceeaa7d65805c4e3cbb119 /framework/src/test/java/org/onap | |
parent | f439543779cf2dfac0b68443aea921c55983bf48 (diff) |
Fixed Sonar Bug and Code Smell Blockers
Issue-ID: CLI-439
Signed-off-by: sharath reddy <bs.reddy@huawei.com>
Change-Id: I81bd79661ab7c6b1152fa481d9273a86e77b4f3a
Signed-off-by: sharath reddy <bs.reddy@huawei.com>
Diffstat (limited to 'framework/src/test/java/org/onap')
-rw-r--r-- | framework/src/test/java/org/onap/cli/fw/conf/OnapCommandConfgTest.java | 4 | ||||
-rw-r--r-- | framework/src/test/java/org/onap/cli/fw/store/OnapCommandProfileStoreTest.java | 5 |
2 files changed, 5 insertions, 4 deletions
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 |