Updating SafeTimer test to ensure SafeTimer.Stopped() doesn't execute the callback

This commit is contained in:
Chris Cameron
2017-12-20 00:08:19 +00:00
parent ba76de88ae
commit 222365f210

View File

@@ -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();