diff options
Diffstat (limited to 'framework/src/test')
-rw-r--r-- | framework/src/test/java/org/onap/cli/fw/OnapCommandRegistrarTest.java | 15 | ||||
-rw-r--r-- | framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java | 15 |
2 files changed, 27 insertions, 3 deletions
diff --git a/framework/src/test/java/org/onap/cli/fw/OnapCommandRegistrarTest.java b/framework/src/test/java/org/onap/cli/fw/OnapCommandRegistrarTest.java index ecbbf972..d123a875 100644 --- a/framework/src/test/java/org/onap/cli/fw/OnapCommandRegistrarTest.java +++ b/framework/src/test/java/org/onap/cli/fw/OnapCommandRegistrarTest.java @@ -141,15 +141,24 @@ public class OnapCommandRegistrarTest { } @Test - public void testParamCache() throws OnapCommandException { + public void testCoverageScope() throws OnapCommandException { + OnapCommandRegistrar.getRegistrar().setProfile("test"); OnapCommandRegistrar.getRegistrar().addParamCache("a", "b"); OnapCommandRegistrar.getRegistrar().getParamCache(); - OnapCommandRegistrar.getRegistrar().getAvailableProductVersions(); + OnapCommandRegistrar.getRegistrar().removeParamCache("a"); + OnapCommandRegistrar.getRegistrar().setDevMode(true); OnapCommandRegistrar.getRegistrar().isDevMode(); + OnapCommandRegistrar.getRegistrar().isInteractiveMode(); - OnapCommandRegistrar.getRegistrar().getEnabledProductVersion(); + OnapCommandRegistrar.getRegistrar().setInteractiveMode(false); + OnapCommandRegistrar.getRegistrar().setEnabledProductVersion("cli-1.0"); + OnapCommandRegistrar.getRegistrar().getEnabledProductVersion(); + OnapCommandRegistrar.getRegistrar().getAvailableProductVersions(); + OnapCommandRegistrar.getRegistrar().listCommandsForEnabledProductVersion(); + + OnapCommandRegistrar.getRegistrar().listCommandInfo(); } } diff --git a/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java b/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java index 20402b0d..dd42cdc5 100644 --- a/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java +++ b/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java @@ -269,4 +269,19 @@ public class OnapCommandErrorTest { assertEquals("0x0013::Command does not support the output format Format", failed.getMessage()); } + + @Test + public void onapProfilePersistTest() { + OnapCommandPersistProfileFailed failed = new OnapCommandPersistProfileFailed("error"); + + assertEquals("0x1302::Failed to persist profile details, error", failed.getMessage()); + } + + + @Test + public void onapProfileLoadTest() { + OnapCommandLoadProfileFailed failed = new OnapCommandLoadProfileFailed("error"); + + assertEquals("0x1301::Failed to load profile details, error", failed.getMessage()); + } } |