public void HandleTemperatureChangedWithAlerterTest()
        {
            var alertIssued = false;
            var alert       = new BidirectionalAlert("test", 10.5m, 1m, () =>
            {
                alertIssued = true;
            });

            var alertList = new List <IAlerter>
            {
                alert
            };

            var thermometer = new AlerterThermometer(Unit.Celsius, null, alertList);

            thermometer.UpdateTemperature(new Temperature(0.5m, Unit.Celsius));
            thermometer.UpdateTemperature(new Temperature(10.5m, Unit.Celsius));
            Assert.Equal(10.5m, thermometer.Temperature.Value);
            Assert.Equal(Unit.Celsius, thermometer.Temperature.Unit);
            Assert.Equal(true, alertIssued);
        }
 public BidirectionalAlertFixture()
 {
     alertRaised        = false;
     bidirectionalAlert = new BidirectionalAlert(alertName, 10.0m, 0.5m, () => { alertRaised = true; });
 }