mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
Updating SafeTimer test to ensure SafeTimer.Stopped() doesn't execute the callback
This commit is contained in:
parent
ba76de88ae
commit
222365f210
1 changed files with 4 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue