summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java')
-rw-r--r--appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java78
1 files changed, 36 insertions, 42 deletions
diff --git a/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java b/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java
index 3e41664da..534606670 100644
--- a/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java
+++ b/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java
@@ -2,34 +2,27 @@
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
* ============LICENSE_END=========================================================
*/
package org.onap.appc.ccadaptor;
-import static org.onap.appc.ccadaptor.ConfigComponentAdaptor.GET_CONFIG_TEMPLATE_PARAM;
-import static org.onap.appc.ccadaptor.ConfigComponentAdaptor.HOST_IP_PARAM;
-import static org.onap.appc.ccadaptor.ConfigComponentAdaptor.PASSWORD_PARAM;
-import static org.onap.appc.ccadaptor.ConfigComponentAdaptor.PORT_NUMBER_PARAM;
-import static org.onap.appc.ccadaptor.ConfigComponentAdaptor.USERNAME_PARAM;
-
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
@@ -48,11 +41,11 @@ public class ConfigComponentAdaptorTest {
String Get_config_template = ("get_config_template");
String key = "GetCliRunningConfig";
Map<String, String> parameters = new HashMap<>();
- parameters.put(HOST_IP_PARAM, "test");
- parameters.put(USERNAME_PARAM, "test");
- parameters.put(PASSWORD_PARAM, "password");
- parameters.put(PORT_NUMBER_PARAM, "22");
- parameters.put(GET_CONFIG_TEMPLATE_PARAM, Get_config_template);
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Get_config_template", Get_config_template);
SvcLogicContext ctx = new SvcLogicContext();
ctx.setAttribute(
@@ -68,11 +61,11 @@ public class ConfigComponentAdaptorTest {
String Get_config_template = ("get_config_template");
String key = "DownloadCliConfig";
Map<String, String> parameters = new HashMap<>();
- parameters.put(HOST_IP_PARAM, "test");
- parameters.put(USERNAME_PARAM, "test");
- parameters.put(PASSWORD_PARAM, "password");
- parameters.put(PORT_NUMBER_PARAM, "22");
- parameters.put(GET_CONFIG_TEMPLATE_PARAM, Get_config_template);
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Get_config_template", Get_config_template);
SvcLogicContext ctx = new SvcLogicContext();
ctx.setAttribute(
@@ -88,11 +81,11 @@ public class ConfigComponentAdaptorTest {
String Get_config_template = ("get_config_template");
String key = "xml-download";
Map<String, String> parameters = new HashMap<>();
- parameters.put(HOST_IP_PARAM, "test");
- parameters.put(USERNAME_PARAM, "test");
- parameters.put(PASSWORD_PARAM, "password");
- parameters.put(PORT_NUMBER_PARAM, "22");
- parameters.put(GET_CONFIG_TEMPLATE_PARAM, Get_config_template);
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Get_config_template", Get_config_template);
SvcLogicContext ctx = new SvcLogicContext();
ctx.setAttribute(
@@ -108,11 +101,11 @@ public class ConfigComponentAdaptorTest {
String Get_config_template = ("get_config_template");
String key = "xml-getrunningconfig";
Map<String, String> parameters = new HashMap<>();
- parameters.put(HOST_IP_PARAM, "test");
- parameters.put(USERNAME_PARAM, "test");
- parameters.put(PASSWORD_PARAM, "password");
- parameters.put(PORT_NUMBER_PARAM, "22");
- parameters.put(GET_CONFIG_TEMPLATE_PARAM, Get_config_template);
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Get_config_template", Get_config_template);
SvcLogicContext ctx = new SvcLogicContext();
ctx.setAttribute(
@@ -128,11 +121,11 @@ public class ConfigComponentAdaptorTest {
String Get_config_template = ("get_config_template");
String key = "escapeSql";
Map<String, String> parameters = new HashMap<>();
- parameters.put(HOST_IP_PARAM, "test");
- parameters.put(USERNAME_PARAM, "test");
- parameters.put(PASSWORD_PARAM, "password");
- parameters.put(PORT_NUMBER_PARAM, "22");
- parameters.put(GET_CONFIG_TEMPLATE_PARAM, Get_config_template);
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Get_config_template", Get_config_template);
SvcLogicContext ctx = new SvcLogicContext();
ctx.setAttribute(
@@ -149,13 +142,13 @@ public class ConfigComponentAdaptorTest {
String Download_config_template = ("test");
String key = "GetCliRunningConfig";
Map<String, String> parameters = new HashMap<>();
- parameters.put(HOST_IP_PARAM, "test");
- parameters.put(USERNAME_PARAM, "test");
- parameters.put(PASSWORD_PARAM, "password");
- parameters.put(PORT_NUMBER_PARAM, "22");
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Get_config_template", Get_config_template);
parameters.put("Protocol", "netconf");
parameters.put("Contents", "Contents");
- parameters.put(GET_CONFIG_TEMPLATE_PARAM, Get_config_template);
parameters.put("Download_config_template", Download_config_template);
parameters.put("Config_contents", "test");
@@ -180,7 +173,7 @@ public class ConfigComponentAdaptorTest {
cca.configure(key, parameters, ctx);
}
- @Test
+ //@Test
public void testAll2() {
Properties props = null;
ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);
@@ -269,4 +262,5 @@ public class ConfigComponentAdaptorTest {
String result = Whitebox.invokeMethod(cca, "prepare", ctx, "test", "test");
Assert.assertEquals("template", result);
}
+
}