public void Setting_CompareTwoInstancesThatAreNotEqual_InstanceAreNotEqual() { Setting setting1 = new Setting("1", "value"); Setting setting2 = new Setting("2", "value"); Assert.AreNotEqual(setting1, setting2); }
public void Setting_CreateInstanceWithKeyAndValue_InstanceIsCorrectInitialized() { string key = "MyKey"; string value = "MyValue"; Setting setting = new Setting(key, value); Assert.AreEqual(key, setting.Key); Assert.AreEqual(value, setting.Value); }
public void AddSetting_NewSetting_SettingIsInList() { Setting expected = new Setting("Key", "Value"); ConfigBuilder builder = CreateFakeConfigBuilder(); builder.AddSetting(expected); Setting actual = builder.GetSetting(expected.Key); Assert.AreEqual(expected, actual); }
/// <summary> /// Adds a setting to the list of settings. /// </summary> /// <param name="setting"></param> public void AddSetting(Setting setting) { if (setting == null) throw new ArgumentNullException("setting"); m_Settings.Add(setting); }