aboutsummaryrefslogtreecommitdiffstats
path: root/common/openecomp-common-configuration-management/openecomp-configuration-management-test/src/test/java/org/openecomp/config/test/FallbackToGlobalNSTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'common/openecomp-common-configuration-management/openecomp-configuration-management-test/src/test/java/org/openecomp/config/test/FallbackToGlobalNSTest.java')
-rw-r--r--common/openecomp-common-configuration-management/openecomp-configuration-management-test/src/test/java/org/openecomp/config/test/FallbackToGlobalNSTest.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/common/openecomp-common-configuration-management/openecomp-configuration-management-test/src/test/java/org/openecomp/config/test/FallbackToGlobalNSTest.java b/common/openecomp-common-configuration-management/openecomp-configuration-management-test/src/test/java/org/openecomp/config/test/FallbackToGlobalNSTest.java
new file mode 100644
index 0000000000..1efc462d4e
--- /dev/null
+++ b/common/openecomp-common-configuration-management/openecomp-configuration-management-test/src/test/java/org/openecomp/config/test/FallbackToGlobalNSTest.java
@@ -0,0 +1,42 @@
+package org.openecomp.config.test;
+
+import org.openecomp.config.api.Configuration;
+import org.openecomp.config.api.ConfigurationManager;
+import org.openecomp.config.util.ConfigTestConstant;
+import org.openecomp.config.util.TestUtil;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.Assert;
+
+import java.io.IOException;
+
+/**
+ * Scenario 12
+ * Verify configuration value fallback to the global namespace if the configuraton property doesnot exist in the namespace configuration
+ * Created by sheetalm on 10/14/2016.
+ */
+public class FallbackToGlobalNSTest {
+
+ public final static String NAMESPACE = "FallbackToGlobalNS";
+
+ @Before
+ public void setUp() throws IOException {
+ String data = "{name:\"SCM\"}";
+ TestUtil.writeFile(data);
+ }
+
+ @Test
+ public void testFallbackToGlobalNS() throws IOException, InterruptedException {
+ Configuration config = ConfigurationManager.lookup();
+ Assert.assertEquals("14",config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
+ Assert.assertEquals("1024",config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_MAXSIZE));
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ TestUtil.cleanUp();
+ }
+
+
+}