public void WhenActualTemp_IsBelowTargetAndElementIsOffForMoreThan10SecondsAndIsAutoFalse_ElementStausDisabled(decimal target, decimal actual, double offSeconds) { IBoiler boiler = new Boiler(); boiler.TargetTemp = target; boiler.ActualTemp = actual; boiler.IsElementOn = false; boiler.IsAuto = false; DateTime dueDate = DateTime.Now.AddSeconds(offSeconds); boiler.EnableOnLowTemp(dueDate); Assert.Equal(boiler.IsElementOn, false); }
public void WhenActualTemp_IsBelowTargetAndElementIsOffForMoreThan10SecondsAndIsAutoTrue_EnableElement(decimal target, decimal actual, double offSeconds, bool isAuto, bool expected) { IBoiler boiler = new Boiler(); boiler.TargetTemp = target; boiler.ActualTemp = actual; boiler.IsElementOn = false; boiler.IsAuto = isAuto; DateTime dueDate = DateTime.Now.AddSeconds(offSeconds); boiler.EnableOnLowTemp(dueDate); Assert.Equal(boiler.IsElementOn, expected); }