mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
Updating SafeTimer test to ensure SafeTimer.Stopped() doesn't execute the callback
This commit is contained in:
@@ -33,11 +33,14 @@ namespace ICD.Common.Utils.Tests.Timers
|
||||
{
|
||||
bool called = false;
|
||||
SafeTimer timer = SafeTimer.Stopped(() => called = true);
|
||||
|
||||
ThreadingUtils.Sleep(200);
|
||||
Assert.IsFalse(called);
|
||||
|
||||
timer.Reset(100);
|
||||
timer.Stop();
|
||||
|
||||
ThreadingUtils.Sleep(200);
|
||||
|
||||
Assert.IsFalse(called);
|
||||
|
||||
timer.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user