From 20dc78d226aca6cb390586a9e19e522d68d0821b Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Fri, 6 Oct 2017 22:30:23 +0530 Subject: Normalize OnapCommandSchema discovery is optimized to register the plugins and http commands from one function Issue-Id: CLI-66 Change-Id: I3b813862ffd5640c5218c4cced7d10f914dce4ad Signed-off-by: Kanagaraj Manickam k00365106 --- .../java/org/onap/cli/validation/OnapValidationTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'validate') diff --git a/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java b/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java index fb9969e9..8d78d40f 100644 --- a/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java +++ b/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java @@ -30,7 +30,7 @@ import org.junit.Ignore; import org.junit.Test; import org.onap.cli.fw.OnapCommandRegistrar; import org.onap.cli.fw.error.OnapCommandException; -import org.onap.cli.fw.utils.ExternalSchema; +import org.onap.cli.fw.utils.SchemaInfo; import org.onap.cli.main.OnapCli; import org.onap.cli.moco.OnapCommandHttpMocoServer; import org.onap.cli.moco.OnapCommandSample; @@ -62,8 +62,8 @@ public class OnapValidationTest { OnapCommandRegistrar.getRegistrar().setEnabledProductVersion(version); System.out.println(version); System.out.println("==========================\n\n"); - for (ExternalSchema sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) { - if (sch.getCmdVersion().equals(version)) { + for (SchemaInfo sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) { + if (sch.getProduct().equals(version)) { System.out.println( "************************* validate '" + sch.getCmdName() + "' *******************************"); OnapCommandRegistrar.getRegistrar().setEnabledProductVersion("open-cli"); @@ -80,8 +80,8 @@ public class OnapValidationTest { System.out.println(version); System.out.println("==========================\n\n"); int i = 1; - for (ExternalSchema sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) { - if (sch.getCmdVersion().equals(version)) { + for (SchemaInfo sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) { + if (sch.getProduct().equals(version)) { System.out.println("[" + i++ + "] " + sch.getCmdName()); System.out.println("-----------------------------------------------\n\n"); this.handle(new String[] { sch.getCmdName(), "-h"}); @@ -93,7 +93,7 @@ public class OnapValidationTest { @Ignore @Test - public void validateCommands() throws OnapCommandException { + public void verifyCommandResults() throws OnapCommandException { OnapCommandHttpMocoServer server = new OnapCommandHttpMocoServer(); server.verifySamples(); } -- cgit 1.2.3-korg