public void Wait_WaitReturnTrue_EarlyEscape() { stopwatch.Start(); ProviderBaseTests.Wait(() => true, 250); Assert.IsTrue(stopwatch.ElapsedMilliseconds < 250); stopwatch.Reset(); }
public void Wait_WaitXMilliseconds_XMillisecondsElapsed() { for (int i = 1; i < 4; i++) { stopwatch.Start(); ProviderBaseTests.Wait(() => false, i * 250); stopwatch.Stop(); Assert.IsTrue(stopwatch.ElapsedMilliseconds > i * 250); stopwatch.Reset(); } }