public void TestPanicNotInitiatedUnderFifteenMinutes() { var paniced = false; var observer = new ServiceObserver() { Panic = () => { paniced = true; } }; // We've only been down for less than a second so it shouldn't fire. observer.PanicTask_Tick(null); Assert.IsFalse(paniced); }
public void TestPanicDowntimeOverFifteenMinutes() { var paniced = false; var observer = new ServiceObserver() { Panic = () => { paniced = true; }, StopTime = DateTime.Now.AddMinutes(-16) }; // We've only been down for less than a second so it shouldn't fire. observer.PanicTask_Tick(null); Assert.IsTrue(paniced); }