public void SmartDeviceSwitchOne_WhenDisabledPropertyIsNotDeclared_ResultIsExpected()
        {
            ObjectId newId = ObjectId.Parse("5aab1c94187378a2581069cf");

            SmartDevice smartDevice = new SmartDevice
            {
                Id   = newId,
                Name = "TEST",
            };

            _context.AddSmartDeviceToCollection(smartDevice);

            _context.SmartDeviceSwitchOne(smartDevice);

            Assert.AreEqual(smartDevice.Disabled, false);

            _context.DeleteSmartDeviceFromCollection(newId);
        }
Пример #2
0
        public void CheckIfSingleSmartDeviceIsDisabledAndSwitchOn(string id)
        {
            ObjectId    _id = ObjectId.Parse(id);
            SmartDevice sd  = _context.GetSingleSmartDeviceFromCollection(_id);

            if (sd.Disabled)
            {
                _context.SmartDeviceSwitchOne(sd);
            }
        }