Initial source code
[oam/tr069-adapter.git] / config-data / src / test / java / org / commscope / tr069adapter / config / ConfigDataTestsUtils.java
1 /*\r
2  * ============LICENSE_START========================================================================\r
3  * ONAP : tr-069-adapter\r
4  * =================================================================================================\r
5  * Copyright (C) 2020 CommScope Inc Intellectual Property.\r
6  * =================================================================================================\r
7  * This tr-069-adapter software file is distributed by CommScope Inc under the Apache License,\r
8  * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You\r
9  * may obtain a copy of the License at\r
10  *\r
11  * http://www.apache.org/licenses/LICENSE-2.0\r
12  *\r
13  * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\r
14  * either express or implied. See the License for the specific language governing permissions and\r
15  * limitations under the License.\r
16  * ===============LICENSE_END=======================================================================\r
17  */\r
18 \r
19 package org.commscope.tr069adapter.config;\r
20 \r
21 import org.commscope.tr069adapter.config.model.ConfigFileContent;\r
22 \r
23 public class ConfigDataTestsUtils {\r
24 \r
25   public static final String SERVER_URI = "http://localhost:9000/";\r
26   public static final String macId = "testMacId";\r
27   public static final String OUI = "0005B9";\r
28   public static final String PRODUCT_CLASS = "LTE_Enterprise_C-RANSC_Cntrl";\r
29   public static final String HAEDWARE_VERSION = "1.1.1.1";\r
30   public static final String SW_VERSION = "4.5.00.001";\r
31 \r
32   public static final String CONFIG_FILE_NAME = macId + ".xml";\r
33 \r
34   // public static ConfigurationData getConfigurationData() {\r
35   // ConfigurationData configData = new ConfigurationData();\r
36   //\r
37   // configData.setHardwareVersion(HAEDWARE_VERSION);\r
38   // configData.setSoftwareVersion(SW_VERSION);\r
39   // configData.setLocalDn(macId);\r
40   // configData.setOUI(OUI);\r
41   // configData.setProductClass(PRODUCT_CLASS);\r
42   //\r
43   //// Map<String, String> map = new HashMap<String, String>();\r
44   //// map.put(", value)\r
45   //// configData.set\r
46   // return configData;\r
47   // }\r
48 \r
49 \r
50   public static ConfigFileContent getConfigFileContent() {\r
51     ConfigFileContent configFileContent = new ConfigFileContent();\r
52 \r
53     configFileContent.setFileContent(getFileContent());\r
54     configFileContent.setMacId(macId);\r
55 \r
56     return configFileContent;\r
57   }\r
58 \r
59 \r
60   public static String getFileContent() {\r
61     String fileContent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + "<configDataFile>\r\n"\r
62         + "  <fileHeader fileFormatVersion=\"32.594 V14.0.0\" vendorName=\"Commscope\"/>\r\n"\r
63         + "  <configData>\r\n"\r
64         + "    <managedElement swVersion=\"4.3.00.038\" localDn=\"0005B95196D0\" hwVersion=\"750742.00.04\" ProductClass=\"LTE_Enterprise_C-RANSC_Cntrl\" OUI=\"0005B9\"/>\r\n"\r
65         + "    <Device>\r\n" + "      <FAP>\r\n" + "        <GPS>\r\n"\r
66         + "          <AGPSServerConfig>\r\n" + "            <Enable>1</Enable>\r\n"\r
67         + "            <Password>dmsuser</Password>\r\n"\r
68         + "            <ServerPort>7001</ServerPort>\r\n"\r
69         + "            <ServerURL>NONE</ServerURL>\r\n"\r
70         + "            <Username>dmsuser</Username>\r\n" + "          </AGPSServerConfig>\r\n"\r
71         + "          <GPSReset>0</GPSReset>\r\n" + "        </GPS>\r\n" + "             </FAP>\r\n"\r
72         + "    </Device>\r\n" + "  </configData>\r\n"\r
73         + "  <fileFooter dateTime=\"2019-07-16T17:32:35+05:30\"/>\r\n" + "</configDataFile>";\r
74 \r
75     return fileContent;\r
76   }\r
77 }\r