Exemplo n.º 1
0
        public void GetProperties_ErrorConfigFileNotFound()
        {
            EcGlobalConfigurations temp = new EcGlobalConfigurations {
                Filename = "notexist", Path = ".\\test"
            };

            PropertiesExtractor.GetProperties(temp);
        }
Exemplo n.º 2
0
        public void GetProperties_FromCache()
        {
            MemoryCache.Default.Add(EcConfigResources.CacheKey_Properties, new Dictionary <string, string> {
                { "key", "value" }, { "key1", "value1" }
            },
                                    DateTime.Now.AddDays(1));
            var properties = PropertiesExtractor.GetProperties(_ecConfigs);

            Assert.AreEqual("value", properties.First(x => x.Key == "key").Value);
        }
Exemplo n.º 3
0
        public void GetProperties_FromFile()
        {
            var properties = PropertiesExtractor.GetProperties(_ecConfigs);

            Assert.AreEqual("dev", properties.First(x => x.Key == "key").Value);
        }