From c8c451d2e1214e4b44d8693dd13e03987baab4e2 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Mon, 18 Sep 2017 12:28:09 +0530 Subject: Fix sonar coverage issues CLI-43 Change-Id: I7dc674db9ffc0bd2281003b3a680e52a0af9baab Signed-off-by: Kanagaraj Manickam k00365106 --- .../java/org/onap/cli/main/OnapCliMainTest.java | 30 +++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'main/src/test/java/org/onap') diff --git a/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java b/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java index f052cbd1..092ef8d8 100644 --- a/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java +++ b/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java @@ -160,43 +160,71 @@ public class OnapCliMainTest { } catch (Exception e) { } - mockConsole("microservice-create -h"); + cli = new OnapCli(new String[] {}); + mockConsole("sample-test -h"); try { cli.handleInteractive(); } catch (Exception e) { } + cli = new OnapCli(new String[] {}); + mockConsole("use cli-1.0"); + try { + cli.handleInteractive(); + } catch (Exception e) { + } + + cli = new OnapCli(new String[] {}); mockConsole("set a=b"); try { cli.handleInteractive(); } catch (Exception e) { } + cli = new OnapCli(new String[] {}); + mockConsole("set"); + try { + cli.handleInteractive(); + } catch (Exception e) { + } + + cli = new OnapCli(new String[] {}); + mockConsole("set a="); + try { + cli.handleInteractive(); + } catch (Exception e) { + } + + cli = new OnapCli(new String[] {}); mockConsole("unset a"); try { cli.handleInteractive(); } catch (Exception e) { } + cli = new OnapCli(new String[] {}); mockConsole("profile test"); try { cli.handleInteractive(); } catch (Exception e) { } + cli = new OnapCli(new String[] {}); mockConsole("version"); try { cli.handleInteractive(); } catch (Exception e) { } + cli = new OnapCli(new String[] {}); mockConsole("help"); try { cli.handleInteractive(); } catch (Exception e) { } + cli = new OnapCli(new String[] {}); mockConsoleReader(); cli.handleInteractive(); -- cgit 1.2.3-korg