[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-core-lib / openecomp-config-lib / src / test / java / org / openecomp / sdc / applicationconfig / dao / ApplicationConfigImplDaoTest.java
index 40cde1e..de41bb8 100644 (file)
@@ -1,9 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
 package org.openecomp.sdc.applicationconfig.dao;
 
-import org.openecomp.sdc.common.errors.CoreException;
-import org.openecomp.sdc.common.errors.ErrorCategory;
-import org.openecomp.sdc.common.errors.ErrorCode;
-import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
 import org.openecomp.core.utilities.applicationconfig.ApplicationConfig;
 import org.openecomp.core.utilities.applicationconfig.ApplicationConfigFactory;
 import org.openecomp.core.utilities.applicationconfig.dao.ApplicationConfigDao;
@@ -11,6 +27,9 @@ import org.openecomp.core.utilities.applicationconfig.dao.ApplicationConfigDaoFa
 import org.openecomp.core.utilities.applicationconfig.dao.type.ApplicationConfigEntity;
 import org.openecomp.core.utilities.applicationconfig.type.ConfigurationData;
 import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -27,7 +46,7 @@ public class ApplicationConfigImplDaoTest {
   private static ApplicationConfig applicationConfig =
       ApplicationConfigFactory.getInstance().createInterface();
 
-//  @BeforeClass
+  @BeforeClass
   public static void init() {
     try {
 
@@ -55,17 +74,17 @@ public class ApplicationConfigImplDaoTest {
     return new String(FileUtils.toByteArray(FileUtils.loadFileToInputStream(path)));
   }
 
-//  @Test
+  @Test
   public void testApplicationConfigTimestampValue() {
     ConfigurationData configurationData = applicationConfig
-        .getConfigurationData("test - namespace", CompositionEntityType.vsp.name());
+        .getConfigurationData("test - namespace", "vsp");
 
     Assert.assertNotNull(configurationData);
     Assert.assertNotEquals(configurationData.getTimeStamp(), 0);
 
   }
 
-//  @Test(dependsOnMethods = "testApplicationConfigTimestampValue")
+  @Test(dependsOnMethods = "testApplicationConfigTimestampValue")
   public void testNotExistingApplicationConfigTimestampValue() {
     try {
       applicationConfig.getConfigurationData("test - namespace", "aaa");
@@ -76,7 +95,7 @@ public class ApplicationConfigImplDaoTest {
 
   }
 
-//  @Test(dependsOnMethods = "testApplicationConfigTimestampValue")
+  @Test(dependsOnMethods = "testApplicationConfigTimestampValue")
   public void testInsertApplicationConfiguration() {
     String testTemplate = loadFileToString("questionnaire/testTemplate.txt");
     applicationConfig.insertValue("test_namespace", "test_key", testTemplate);