예제 #1
0
        public void Test_GetConfigKeysConfig()
        {
            Config config = new Config(TestHelper.GetNodeConfigPath());
            
            string[] keys = config.GetParams();

            Assert.IsNotNull(keys.Length == 1);
        }
예제 #2
0
        public void Test_GetGroupsConfig()
        {
            Config config = new Config(TestHelper.GetNodeConfigPath());

            Dictionary<string, string> value = config.GetGroup("Test Group", null);

            Assert.AreEqual(value["CONFIG_VALUE"], "testing");
        }
예제 #3
0
        public void Test_ReadValueConfig()
        {
            Config config = new Config(TestHelper.GetNodeConfigPath());

            string value = config.Get("CLOUD_DOMAIN");

            Assert.AreEqual("example.com", value);
        }
예제 #4
0
        public void Test_ReadDefaultConfig()
        {
            Config config = new Config(TestHelper.GetNodeConfigPath());

            string value = config.Get("not existent", "Value");

            Assert.AreEqual("Value", value);
        }
예제 #5
0
        public void Test_ReadConfig()
        {
            try
            {
                Config config = new Config(TestHelper.GetNodeConfigPath());
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }

        }