public void AnAlarmIsOnWhenPressureIsTweentyTwo() { var alarm = AlarmBuilder.AnAlarm().WithSensorDetecting(22).AndWithSafetyRangeBetween(17, 21).Build(); alarm.Check(); Assert.AreEqual(true, alarm.IsOn); }
public void AnAlarmIsOffWhenPressureIsSevenTeen() { var alarm = AlarmBuilder.AnAlarm().WithSensorDetecting(17).AndWithSafetyRangeBetween(17, 21).Build(); alarm.Check(); Assert.AreEqual(false, alarm.IsOn); }