Example #1
0
        public void should_replace_connection_string_from_config()
        {
            AppSettingsReplacer.Install(config);

            Assert.That(ConfigurationManager.ConnectionStrings["default"].ConnectionString, Is.EqualTo("Server=localhost;Database=test_name;User ID=test_user;Password=test_password;"));
            Assert.That(ConfigurationManager.ConnectionStrings["default"].ProviderName, Is.EqualTo("System.Data.SqlClient"));
        }
Example #2
0
        public void should_be_able_to_replace_simple_nvc_settings()
        {
            AppSettingsReplacer.Install(config);

            var section = (NameValueCollection)ConfigurationManager.GetSection("ServiceConfiguration");

            Assert.That(section["helloWorldService"], Is.EqualTo("msmq://helloWorldService"));
        }
Example #3
0
        public void should_be_able_to_replace_appSettings()
        {
            AppSettingsReplacer.Install(config);

            Assert.That(ConfigurationManager.AppSettings["e"], Is.EqualTo("a+b-a+b"));
        }