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

            Assert.IsNotNull(keys.Length == 1);
        }
Esempio n. 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");
        }
Esempio n. 3
0
        public void Test_ReadValueConfig()
        {
            Config config = new Config(TestHelper.GetNodeConfigPath());

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

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

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

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

        }