Initial source code
[oam/tr069-adapter.git] / config-data / src / test / java / org / commscope / tr069adapter / config / ConfigDataTestsUtils.java
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
new file mode 100644 (file)
index 0000000..7b5a841
--- /dev/null
@@ -0,0 +1,77 @@
+/*\r
+ * ============LICENSE_START========================================================================\r
+ * ONAP : tr-069-adapter\r
+ * =================================================================================================\r
+ * Copyright (C) 2020 CommScope Inc Intellectual Property.\r
+ * =================================================================================================\r
+ * This tr-069-adapter software file is distributed by CommScope Inc under the Apache License,\r
+ * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You\r
+ * may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\r
+ * either express or implied. See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ===============LICENSE_END=======================================================================\r
+ */\r
+\r
+package org.commscope.tr069adapter.config;\r
+\r
+import org.commscope.tr069adapter.config.model.ConfigFileContent;\r
+\r
+public class ConfigDataTestsUtils {\r
+\r
+  public static final String SERVER_URI = "http://localhost:9000/";\r
+  public static final String macId = "testMacId";\r
+  public static final String OUI = "0005B9";\r
+  public static final String PRODUCT_CLASS = "LTE_Enterprise_C-RANSC_Cntrl";\r
+  public static final String HAEDWARE_VERSION = "1.1.1.1";\r
+  public static final String SW_VERSION = "4.5.00.001";\r
+\r
+  public static final String CONFIG_FILE_NAME = macId + ".xml";\r
+\r
+  // public static ConfigurationData getConfigurationData() {\r
+  // ConfigurationData configData = new ConfigurationData();\r
+  //\r
+  // configData.setHardwareVersion(HAEDWARE_VERSION);\r
+  // configData.setSoftwareVersion(SW_VERSION);\r
+  // configData.setLocalDn(macId);\r
+  // configData.setOUI(OUI);\r
+  // configData.setProductClass(PRODUCT_CLASS);\r
+  //\r
+  //// Map<String, String> map = new HashMap<String, String>();\r
+  //// map.put(", value)\r
+  //// configData.set\r
+  // return configData;\r
+  // }\r
+\r
+\r
+  public static ConfigFileContent getConfigFileContent() {\r
+    ConfigFileContent configFileContent = new ConfigFileContent();\r
+\r
+    configFileContent.setFileContent(getFileContent());\r
+    configFileContent.setMacId(macId);\r
+\r
+    return configFileContent;\r
+  }\r
+\r
+\r
+  public static String getFileContent() {\r
+    String fileContent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + "<configDataFile>\r\n"\r
+        + "  <fileHeader fileFormatVersion=\"32.594 V14.0.0\" vendorName=\"Commscope\"/>\r\n"\r
+        + "  <configData>\r\n"\r
+        + "    <managedElement swVersion=\"4.3.00.038\" localDn=\"0005B95196D0\" hwVersion=\"750742.00.04\" ProductClass=\"LTE_Enterprise_C-RANSC_Cntrl\" OUI=\"0005B9\"/>\r\n"\r
+        + "    <Device>\r\n" + "      <FAP>\r\n" + "        <GPS>\r\n"\r
+        + "          <AGPSServerConfig>\r\n" + "            <Enable>1</Enable>\r\n"\r
+        + "            <Password>dmsuser</Password>\r\n"\r
+        + "            <ServerPort>7001</ServerPort>\r\n"\r
+        + "            <ServerURL>NONE</ServerURL>\r\n"\r
+        + "            <Username>dmsuser</Username>\r\n" + "          </AGPSServerConfig>\r\n"\r
+        + "          <GPSReset>0</GPSReset>\r\n" + "        </GPS>\r\n" + "            </FAP>\r\n"\r
+        + "    </Device>\r\n" + "  </configData>\r\n"\r
+        + "  <fileFooter dateTime=\"2019-07-16T17:32:35+05:30\"/>\r\n" + "</configDataFile>";\r
+\r
+    return fileContent;\r
+  }\r
+}\r