Created
July 2, 2015 18:34
-
-
Save christopherbauer/07d44ee4157d65a9ad50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void then_should_return_users() | |
{ | |
// Arrange | |
var reader = new ConfigurationReader(); | |
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); | |
string a = "A"; | |
string b = "B"; | |
config.AppSettings.Settings.Remove(a); | |
config.AppSettings.Settings.Remove(b); | |
config.AppSettings.Settings.Add(new KeyValueConfigurationElement(a, "A")); | |
config.AppSettings.Settings.Add(new KeyValueConfigurationElement(b, "B")); | |
config.Save(ConfigurationSaveMode.Modified, true); | |
ConfigurationManager.RefreshSection("appSettings"); | |
// Act | |
var users = reader.GetUsers(); | |
// Assert | |
Assert.That(users, Is.EqualTo("A,B")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment