diff options
author | jitendra007 <jitendra.sharma1@huawei.com> | 2020-07-21 14:35:31 +0530 |
---|---|---|
committer | priyanka.akhade <priyanka.akhade@huawei.com> | 2020-08-04 09:44:38 +0530 |
commit | 9921b1751cde31721958d004935f2b7fc5e95513 (patch) | |
tree | e41a158075ba6f95af21fc9ef25425e0dca51851 /profiles/http/src/test | |
parent | fc9af3118881c83a0928e9a21135641808288f84 (diff) |
Code improvement for pending sonar issues
Issue-ID: CLI-270
Signed-off-by: jitendra007 <jitendra.sharma1@huawei.com>
Change-Id: Ie27d3ff077fa1ef4d13788849aa82d695f183eeb
Diffstat (limited to 'profiles/http/src/test')
-rw-r--r-- | profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java | 2 | ||||
-rw-r--r-- | profiles/http/src/test/java/org/onap/cli/fw/http/error/OnapCommandErrorTest.java | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java index 2860388b..68995dba 100644 --- a/profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java +++ b/profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java @@ -216,7 +216,7 @@ public class OnapHttpConnectionTest { } @Test() - public void httpUnSecuredCloseExceptionTest() throws OnapCommandHttpFailure { + public void httpUnSecuredCloseExceptionTest() throws IOException { inp.setMethod("other"); con = new OnapHttpConnection(); con.close(); diff --git a/profiles/http/src/test/java/org/onap/cli/fw/http/error/OnapCommandErrorTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/error/OnapCommandErrorTest.java index cd2131e9..e007af15 100644 --- a/profiles/http/src/test/java/org/onap/cli/fw/http/error/OnapCommandErrorTest.java +++ b/profiles/http/src/test/java/org/onap/cli/fw/http/error/OnapCommandErrorTest.java @@ -52,6 +52,13 @@ public class OnapCommandErrorTest { } @Test + public void oclipCommandLoginFailedTest3() { + OnapCommandLoginFailed failed = new OnapCommandLoginFailed("Failed"); + + assertEquals("0x4001::Login failed, Failed", failed.getMessage()); + } + + @Test public void oclipCommandLoginFailedTest1() { OnapCommandLoginFailed failed = new OnapCommandLoginFailed(new Exception("Failed")); |