Exemple #1
0
        public void Test_ProvidersFromConfigFile()
        {
            var provider = new WebConfigurationProvider();

            provider.Load();

            Assert.True(provider.TryGet("Providers:conn1", out string value));
            Assert.Equal("provider1", value);
        }
Exemple #2
0
        public void Test_AppSettingsFromConfigFile()
        {
            var provider = new WebConfigurationProvider();

            provider.Load();

            Assert.True(provider.TryGet("AppSettings:appkey1", out string value));
            Assert.Equal("appvalue1", value);
        }
Exemple #3
0
        public void Test_ConnectionStringFromConfigFile()
        {
            var provider = new WebConfigurationProvider();

            provider.Load();

            Assert.True(provider.TryGet("ConnectionStrings:conn1", out string value));
            Assert.Equal("my dummy connection string", value);
        }