Beispiel #1
0
        public void CustomFlushIntervalTest()
        {
            UpdateAppSettings(new Dictionary <string, string>());

            var config = new FullFrameworkConfigReader();

            Environment.SetEnvironmentVariable(ConfigConsts.EnvVarNames.FlushInterval, "10ms");

            config.FlushInterval.Should().Be(TimeSpan.FromMilliseconds(10));

            UpdateAppSettings(new Dictionary <string, string> {
                { ConfigConsts.KeyNames.FlushInterval, "20ms" }
            });

            config.FlushInterval.Should().Be(TimeSpan.FromMilliseconds(20));
        }
Beispiel #2
0
        public void CustomEnvironmentTest()
        {
            UpdateAppSettings(new Dictionary <string, string>());

            var config = new FullFrameworkConfigReader();

            Environment.SetEnvironmentVariable(ConfigConsts.EnvVarNames.Environment, "Development");

            config.Environment.Should().Be("Development");

            UpdateAppSettings(new Dictionary <string, string> {
                { ConfigConsts.KeyNames.Environment, "Staging" }
            });

            config.Environment.Should().Be("Staging");
        }