X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=config-data%2Fsrc%2Ftest%2Fjava%2Forg%2Fcommscope%2Ftr069adapter%2Fconfig%2FConfigDataTestsUtils.java;h=de7b523fd1e6e5fc50dbd7189aa9aaa2d2588b1e;hb=76744e810f35c84ecbd1d9998e361052466e9483;hp=d9b8ec2a4585d71d5af83556dec0e7c5b00d04f0;hpb=ce4e2d38e3d42725f61c39dd172325d2def4bc44;p=oam%2Ftr069-adapter.git diff --git a/config-data/src/test/java/org/commscope/tr069adapter/config/ConfigDataTestsUtils.java b/config-data/src/test/java/org/commscope/tr069adapter/config/ConfigDataTestsUtils.java index d9b8ec2..de7b523 100644 --- a/config-data/src/test/java/org/commscope/tr069adapter/config/ConfigDataTestsUtils.java +++ b/config-data/src/test/java/org/commscope/tr069adapter/config/ConfigDataTestsUtils.java @@ -1,85 +1,86 @@ -/* - * ============LICENSE_START======================================================================== - * ONAP : tr-069-adapter - * ================================================================================================= - * Copyright (C) 2020 CommScope Inc Intellectual Property. - * ================================================================================================= - * This tr-069-adapter software file is distributed by CommScope Inc 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 - * - * This file 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. - * ===============LICENSE_END======================================================================= - */ - -package org.commscope.tr069adapter.config; - -import java.util.ArrayList; -import java.util.List; -import org.commscope.tr069adapter.config.model.ConfigFileContent; - -public class ConfigDataTestsUtils { - - private ConfigDataTestsUtils() {} - - public static final String SERVER_URI = "http://localhost:9000/"; - public static final String macId = "testMacId"; - public static final String OUI = "0005B9"; - public static final String PRODUCT_CLASS = "LTE_Enterprise_C-RANSC_Cntrl"; - public static final String HAEDWARE_VERSION = "1.1.1.1"; - public static final String SW_VERSION = "4.5.00.001"; - - public static final String CONFIG_FILE_NAME = macId + ".xml"; - - // public static ConfigurationData getConfigurationData() { - // ConfigurationData configData = new ConfigurationData(); - // - // configData.setHardwareVersion(HAEDWARE_VERSION); - // configData.setSoftwareVersion(SW_VERSION); - // configData.setLocalDn(macId); - // configData.setOUI(OUI); - // configData.setProductClass(PRODUCT_CLASS); - // - //// Map map = new HashMap(); - //// map.put(", value) - //// configData.set - // return configData; - // } - - - public static List getConfigFileContent() { - List data = new ArrayList<>(); - - for (int i = 0; i < 5; i++) { - ConfigFileContent configFileContent = new ConfigFileContent(); - configFileContent.setFileContent(getFileContent()); - configFileContent.setMacId(macId); - configFileContent.setSwVersion("4." + i); - } - - return data; - } - - - public static String getFileContent() { - String fileContent = "\r\n" + "\r\n" - + " \r\n" - + " \r\n" - + " \r\n" - + " \r\n" + " \r\n" + " \r\n" - + " \r\n" + " 1\r\n" - + " dmsuser\r\n" - + " 7001\r\n" - + " NONE\r\n" - + " dmsuser\r\n" + " \r\n" - + " 0\r\n" + " \r\n" + " \r\n" - + " \r\n" + " \r\n" - + " \r\n" + ""; - - return fileContent; - } -} +/* + * ============LICENSE_START======================================================================== + * ONAP : tr-069-adapter + * ================================================================================================= + * Copyright (C) 2020 CommScope Inc Intellectual Property. + * ================================================================================================= + * This tr-069-adapter software file is distributed by CommScope Inc 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 + * + * This file 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. + * ===============LICENSE_END======================================================================= + */ + +package org.commscope.tr069adapter.config; + +import java.util.ArrayList; +import java.util.List; + +import org.commscope.tr069adapter.config.model.ConfigFileContent; + +public class ConfigDataTestsUtils { + + private ConfigDataTestsUtils() {} + + public static final String SERVER_URI = "http://localhost:9000/"; + public static final String macId = "testMacId"; + public static final String OUI = "0005B9"; + public static final String PRODUCT_CLASS = "LTE_Enterprise_C-RANSC_Cntrl"; + public static final String HAEDWARE_VERSION = "1.1.1.1"; + public static final String SW_VERSION = "4.5.00.001"; + + public static final String CONFIG_FILE_NAME = macId + ".xml"; + + // public static ConfigurationData getConfigurationData() { + // ConfigurationData configData = new ConfigurationData(); + // + // configData.setHardwareVersion(HAEDWARE_VERSION); + // configData.setSoftwareVersion(SW_VERSION); + // configData.setLocalDn(macId); + // configData.setOUI(OUI); + // configData.setProductClass(PRODUCT_CLASS); + // + //// Map map = new HashMap(); + //// map.put(", value) + //// configData.set + // return configData; + // } + + + public static List getConfigFileContent() { + List data = new ArrayList<>(); + + for (int i = 0; i < 5; i++) { + ConfigFileContent configFileContent = new ConfigFileContent(); + configFileContent.setFileContent(getFileContent()); + configFileContent.setMacId(macId); + configFileContent.setSwVersion("4." + i); + } + + return data; + } + + + public static String getFileContent() { + String fileContent = "\r\n" + "\r\n" + + " \r\n" + + " \r\n" + + " \r\n" + + " \r\n" + " \r\n" + " \r\n" + + " \r\n" + " 1\r\n" + + " dmsuser\r\n" + + " 7001\r\n" + + " NONE\r\n" + + " dmsuser\r\n" + " \r\n" + + " 0\r\n" + " \r\n" + " \r\n" + + " \r\n" + " \r\n" + + " \r\n" + ""; + + return fileContent; + } +}