1 package org.onap.config.test;
3 import org.onap.config.api.Configuration;
4 import org.onap.config.api.ConfigurationManager;
5 import org.onap.config.util.ConfigTestConstant;
6 import org.onap.config.util.TestUtil;
7 import org.junit.After;
8 import org.junit.Before;
10 import org.junit.Assert;
12 import java.io.IOException;
16 * Verify configuration value fallback to the global namespace if the configuraton property doesnot exist in the namespace configuration
17 * Created by sheetalm on 10/14/2016.
19 public class FallbackToGlobalNSTest {
21 public final static String NAMESPACE = "FallbackToGlobalNS";
24 public void setUp() throws IOException {
25 String data = "{name:\"SCM\"}";
26 TestUtil.writeFile(data);
30 public void testFallbackToGlobalNS() throws IOException, InterruptedException {
31 Configuration config = ConfigurationManager.lookup();
32 Assert.assertEquals("14",config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
33 Assert.assertEquals("1024",config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_MAXSIZE));
37 public void tearDown() throws Exception {