public void WhenBurstIntervalHasElapsed_EnableElement_UnlessBurstIsOff() { Boiler b = new Boiler(); b.BurstTime = 100; b.BurstInterval = 10; b.IsElementOn = true; b.IsBurstOn = false; bool ret = b.BurstCycleOn(DateTime.Now.AddSeconds(11)); Assert.False(ret); Assert.True(b.IsElementOn); }
public void WhenBurstIntervalHasElapsed_EnableElement_WhenAutoOff() { Boiler b = new Boiler(); b.BurstTime = 100; b.BurstInterval = 10; b.IsElementOn = true; b.IsBurstOn = true; b.IsAuto = false; bool ret = b.BurstCycleOn(DateTime.Now.AddSeconds(11)); Assert.True(ret); Assert.True(b.IsElementOn); }
public void WhenBurstIntervalHasNotElapsed_DoNotEnableElement_WhenAutoOn() { Boiler b = new Boiler(); b.BurstTime = 100; b.BurstInterval = 10; b.IsElementOn = true; b.IsBurstOn = true; b.IsAuto = true; bool ret = b.BurstCycleOn(DateTime.Now.AddSeconds(5)); Assert.False(ret); Assert.True(b.IsElementOn); }
public void WhenBurstIntervalHasNotElapsed_DoNotEnableElement_UnlessBurstIsOff() { Boiler b = new Boiler(); b.BurstTime = 100; b.BurstInterval = 10; b.IsElementOn = true; b.IsElementOn = false; b.IsBurstOn = false; bool ret = b.BurstCycleOn(DateTime.Now.AddSeconds(5)); Assert.False(ret); Assert.False(b.IsElementOn); }