public void BadDesign_StandardVoltageAlarmCanDetectVoltageDrop() { // arrange double standardAlarmThresholdValue = 1d; StandardVoltageAlarm standardVoltageAlarm = new StandardVoltageAlarm(standardAlarmThresholdValue); // act bool hasVoltageDroppedBelowThreshold = standardVoltageAlarm.HasVoltageDroppedBelowThreshold(0); // assert Assert.IsTrue(hasVoltageDroppedBelowThreshold); }
public void BadDesign_StandardVoltageAlarmCanRaiseAlarm() { // arrange double standardAlarmThresholdValue = -1d; StandardVoltageAlarm standardVoltageAlarm = new StandardVoltageAlarm(standardAlarmThresholdValue); // act standardVoltageAlarm.RaiseAlarm(); // assert Assert.AreEqual(standardVoltageAlarm.NumberOfAlarmsRaised, 1); }