Ejemplo n.º 1
0
        public void NotifyOnTemperatureChange_ShouldNotNotify(double triggerReading, double threshold, double sensitivityVariance, TemperatureChangeType changeType, ThresholdInfo result)
        {
            // Arrange
            // Set the reading before we request a notfication so it's not the first time
            _thermometer.SetReading(triggerReading);

            // Act
            var actualReading = default(ThresholdInfo);

            _thermometer.NotifyOnTemperatureChange(changeType, "Boiling", threshold, sensitivityVariance, (t) => { actualReading = t; });
            _thermometer.SetReading(triggerReading);

            // Assert
            // Should be null and should not have been called
            Assert.AreEqual(result, actualReading);
        }