public async Task StatusAuditorStopAfterDispose() { using (AmbientClock.Pause()) { StatusAuditorAuditNeverRunTest toStop; using (StatusAuditorAuditNeverRunTest test = new StatusAuditorAuditNeverRunTest(nameof(StatusAuditorAuditNeverRunTest))) { toStop = test; } await toStop.BeginStop(); } }
public void StatusAuditorNeverAudit() { using (AmbientClock.Pause()) { using (StatusAuditorAuditNeverRunTest test = new StatusAuditorAuditNeverRunTest(nameof(StatusAuditorAuditNeverRunTest))) { Assert.AreEqual("StatusAuditorAuditNeverRunTest", test.TargetSystem); // run the initial audit manually and synchronously test.InitialAuditTimer_Elapsed(null, null); } } }
public void StatusAuditorTriggerAfterDisposed() { using (AmbientClock.Pause()) { StatusAuditorAuditNeverRunTest testCopy; using (StatusAuditorAuditNeverRunTest test = new StatusAuditorAuditNeverRunTest(nameof(StatusAuditorAuditNeverRunTest))) { testCopy = test; Assert.AreEqual("StatusAuditorAuditNeverRunTest", test.TargetSystem); } testCopy.AuditTimer_Elapsed(null, null); } }