public void Test_Timeout() { var timer = new Stopwatch(); timer.Start(); // ReSharper disable once EqualExpressionComparison WaitForDelegate.Wait(() => 1 == 1, TimeSpan.FromMilliseconds(1000)); timer.Stop(); Assert.InRange(timer.ElapsedMilliseconds, 1000, 1575); }
public void Test_NoTimeout() { WaitForDelegate.Wait(() => 1 == 2); }