예제 #1
0
        public void Setting_CompareTwoInstancesThatAreNotEqual_InstanceAreNotEqual()
        {
            Setting setting1 = new Setting("1", "value");
            Setting setting2 = new Setting("2", "value");

            Assert.AreNotEqual(setting1, setting2);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
 /// <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);
 }