Example #1
0
        public void CanRemoveThermostatWithSerial()
        {
            var thermostat1 = new Thermostat
            {
                Serial = "Thermostat1"
            };

            var thermostat2 = new Thermostat
            {
                Serial = "Thermostat2"
            };

            var thermostats = new Thermostats();

            thermostats.thermostats.Add(thermostat1);
            thermostats.thermostats.Add(thermostat2);

            thermostats.RemoveThermostatWithSerial("Thermostat1");

            Assert.AreEqual(1, thermostats.thermostats.Count);
            Assert.AreEqual("Thermostat2", thermostats.thermostats[0].Serial);
        }