public void Get() { // This test makes sure that if there is a config setting then it is used in place of the default. Make sure that the default value and the config value are different. const string CONFIG = "not " + DEFAULT; var configuration = new TestStringConfiguration(ConfigurationWithSetting("StringProperty", $"{CONFIG}")); Assert.AreEqual(CONFIG, configuration.StringProperty); }
public void Get() { const string CONFIG = "cedd"; var configuration = new TestStringConfiguration(ConfigurationWithSetting("StringProperty", CONFIG)); Assert.AreEqual(CONFIG, configuration.StringProperty); }
public void GetMissing() { var configuration = new TestStringConfiguration(ConfigurationWithNoSettings); Assert.Throws <ConfigurationException>( () => { var v = configuration.StringProperty; } ); }
public void GetMissing() { var configuration = new TestStringConfiguration(ConfigurationWithNoSettings); Assert.AreEqual(DEFAULT, configuration.StringProperty); }