public async Task Restore_Sensor_When_Exists_And_Is_Deleted()
        {
            // Arrange
            contextOptions = new DbContextOptionsBuilder <SmartDormitoryContext>()
                             .UseInMemoryDatabase(databaseName: "Restore_Sensor_When_Exists_And_Is_Deleted")
                             .Options;

            var sensor = SetupFakeSensor();

            sensor.IsDeleted = true;

            using (var actContext = new SmartDormitoryContext(contextOptions))
            {
                await actContext.Sensors.AddAsync(sensor);

                await actContext.SaveChangesAsync();
            }

            // Act && Assert
            using (var assertContext = new SmartDormitoryContext(contextOptions))
            {
                var sut = new SensorsService(assertContext,
                                             measureTypeServiceMock.Object);

                await sut.DeleteSensor(sensor.Id);

                var result = await assertContext.Sensors.FirstOrDefaultAsync(s => s.Id == sensor.Id);

                Assert.IsFalse(result.IsDeleted);
            }
        }
        public async Task Throw_EntityDoesntExistException_When_Sensor_Does_Not_Exist()
        {
            // Arrange
            contextOptions = new DbContextOptionsBuilder <SmartDormitoryContext>()
                             .UseInMemoryDatabase(databaseName: "Throw_EntityDoesntExistException_When_Sensor_Does_Not_Exist")
                             .Options;

            string sensorId = Guid.NewGuid().ToString();

            // Act && Assert// Arrange

            using (var assertContext = new SmartDormitoryContext(contextOptions))
            {
                var sut = new SensorsService(assertContext,
                                             measureTypeServiceMock.Object);

                await Assert.ThrowsExceptionAsync <EntityDoesntExistException>(
                    () => sut.DeleteSensor(sensorId));
            }
        }