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

            var thermostats = new Thermostats();

            thermostats.thermostats.Add(thermostat);

            Assert.IsFalse(thermostats.HasSecretAndUuidFor("Thermostat1"));
        }
Example #2
0
        public void KnowsThatUuidIsNotEnoughForSecretAndUuid()
        {
            var thermostat = new Thermostat
            {
                Serial = "Thermostat1",
                Uuid   = "5D7000A0-0D45-41FC-B6AD-08CB8BC149B9",
            };

            var thermostats = new Thermostats();

            thermostats.thermostats.Add(thermostat);

            Assert.IsFalse(thermostats.HasSecretAndUuidFor("Thermostat1"));
        }
Example #3
0
        public void KnowsThatSecretIsNotEnoughForSecretAndUuid()
        {
            var thermostat = new Thermostat
            {
                Serial    = "Thermostat1",
                SecretKey = "ABC"
            };

            var thermostats = new Thermostats();

            thermostats.thermostats.Add(thermostat);

            Assert.IsFalse(thermostats.HasSecretAndUuidFor("Thermostat1"));
        }
Example #4
0
        public void KnowsWhenWeHaveSecretAndUuidForThermostat()
        {
            var thermostat = new Thermostat
            {
                Serial    = "Thermostat1",
                Uuid      = "5D7000A0-0D45-41FC-B6AD-08CB8BC149B9",
                SecretKey = "ABC"
            };

            var thermostats = new Thermostats();

            thermostats.thermostats.Add(thermostat);

            Assert.IsTrue(thermostats.HasSecretAndUuidFor("Thermostat1"));
        }
Example #5
0
        public void KnowsThatWeHaveNoSecretForMissingThermostat()
        {
            var thermostats = new Thermostats();

            Assert.IsFalse(thermostats.HasSecretAndUuidFor("Don't know this diddy"));
        }