public void LoadKeyValuePairsFromEnvironmentDictionary()
        {
            var dict = new Hashtable()
            {
                { "DefaultConnection:ConnectionString", "TestConnectionString" },
                { "DefaultConnection:Provider", "SqlClient" },
                { "Inventory:ConnectionString", "AnotherTestConnectionString" },
                { "Inventory:Provider", "MySql" }
            };
            var envConfigSrc = new EnvironmentVariablesConfigurationProvider(null);

            envConfigSrc.Load(dict);

            Assert.Equal("TestConnectionString", envConfigSrc.Get("defaultconnection:ConnectionString"));
            Assert.Equal("SqlClient", envConfigSrc.Get("DEFAULTCONNECTION:PROVIDER"));
            Assert.Equal("AnotherTestConnectionString", envConfigSrc.Get("Inventory:CONNECTIONSTRING"));
            Assert.Equal("MySql", envConfigSrc.Get("Inventory:Provider"));
            Assert.Equal("EnvironmentVariablesConfigurationProvider Prefix: ''", envConfigSrc.ToString());
        }
        public void LoadKeyValuePairsFromEnvironmentDictionaryWithPrefix()
        {
            var dict = new Hashtable()
            {
                { "DefaultConnection:ConnectionString", "TestConnectionString" },
                { "DefaultConnection:Provider", "SqlClient" },
                { "Inventory:ConnectionString", "AnotherTestConnectionString" },
                { "Inventory:Provider", "MySql" }
            };
            var envConfigSrc = new EnvironmentVariablesConfigurationProvider("DefaultConnection:");

            envConfigSrc.Load(dict);

            Assert.Equal("TestConnectionString", envConfigSrc.Get("ConnectionString"));
            Assert.Equal("SqlClient", envConfigSrc.Get("Provider"));
            Assert.Equal("EnvironmentVariablesConfigurationProvider Prefix: 'DefaultConnection:'", envConfigSrc.ToString());
        }