Esempio n. 1
0
        public void OverrideFromEnvironmentVariables()
        {
            JObject cfg = JObject.Parse(@"{'A': { 'B': 'default' } }");

            Environment.SetEnvironmentVariable("A.B", "override");
            EnvironmentVariables.AddOverridesTo(cfg);
            var actual = JsonConvert.SerializeObject(cfg, Formatting.None);

            Assert.AreEqual("{'A':{'B':'override'}}".Replace("'", "\""), actual);
        }