コード例 #1
0
        public void ChangeSmartDeviceState_WhenStateIsNull_ResultIsEqual()
        {
            ObjectId newId = ObjectId.Parse("5cab1c93187378a2581069cf");

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


            _context.AddSmartDeviceToCollection(smartDevice);
            _context.ChangeSmartDeviceState(smartDevice, "TEST");

            var result = _context.GetSingleSmartDeviceFromCollection(newId);

            var resultState = result.State;

            Assert.AreEqual(resultState, "TEST");

            _context.DeleteSmartDeviceFromCollection(newId);
        }