diff options
Diffstat (limited to 'services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java')
-rw-r--r-- | services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java index e8485d109..a55afbed4 100644 --- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java +++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2020 Nordix Foundation. + * Modifications Copyright (C) 2020 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,7 +41,7 @@ public class ContextParameterTests { @Test public void testNoParamsTest() { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextNoParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextNoParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); assertThatThrownBy(() -> new ApexParameterHandler().getParameters(arguments)) @@ -51,7 +52,7 @@ public class ContextParameterTests { @Test public void testBadParamsTest() { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextBadParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextBadParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); assertThatThrownBy(() -> new ApexParameterHandler().getParameters(arguments)) @@ -62,7 +63,7 @@ public class ContextParameterTests { @Test public void testBadPluginParamNameTest() { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextBadPluginNameParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextBadPluginNameParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); assertThatThrownBy(() -> new ApexParameterHandler().getParameters(arguments)) @@ -74,7 +75,7 @@ public class ContextParameterTests { @Test public void testBadClassParamTest() { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextBadClassParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextBadClassParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); assertThatThrownBy(() -> new ApexParameterHandler().getParameters(arguments)).hasMessage( @@ -86,7 +87,7 @@ public class ContextParameterTests { @Test public void testBadPluginClassTest() { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextBadPluginClassParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextBadPluginClassParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); assertThatThrownBy(() -> new ApexParameterHandler().getParameters(arguments)) @@ -102,7 +103,7 @@ public class ContextParameterTests { @Test public void testOkFlushParamTest() throws ParameterException { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextOKFlushParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextOKFlushParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments); @@ -115,7 +116,7 @@ public class ContextParameterTests { @Test public void testOkDefaultParamTest() throws ParameterException { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextOKDefaultParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextOKDefaultParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments); @@ -128,7 +129,7 @@ public class ContextParameterTests { @Test public void testOkDistParamTest() throws ParameterException { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextOKDistParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextOKDistParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments); @@ -142,7 +143,7 @@ public class ContextParameterTests { @Test public void testOkFullDefaultParamTest() throws ParameterException { - final String[] args = { "-c", "src/test/resources/parameters/goodParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/goodParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments); @@ -164,7 +165,7 @@ public class ContextParameterTests { @Test public void testOkFullParamTest() throws ParameterException { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextOKFullParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextOKFullParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments); @@ -192,7 +193,7 @@ public class ContextParameterTests { @Test public void testBadClassDistParamTest() { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextBadClassDistParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextBadClassDistParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); assertThatThrownBy(() -> new ApexParameterHandler().getParameters(arguments)) @@ -207,7 +208,7 @@ public class ContextParameterTests { @Test public void testBadClassLockParamTest() { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextBadClassLockParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextBadClassLockParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); assertThatThrownBy(() -> new ApexParameterHandler().getParameters(arguments)) @@ -222,7 +223,7 @@ public class ContextParameterTests { @Test public void testBadClassPersistParamTest() { - final String[] args = { "-c", "src/test/resources/parameters/serviceContextBadClassPersistParams.json" }; + final String[] args = {"-p", "src/test/resources/parameters/serviceContextBadClassPersistParams.json"}; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); assertThatThrownBy(() -> new ApexParameterHandler().getParameters(arguments)) |