Example #1
0
 public void Wait_WaitReturnTrue_EarlyEscape()
 {
     stopwatch.Start();
     ProviderBaseTests.Wait(() => true, 250);
     Assert.IsTrue(stopwatch.ElapsedMilliseconds < 250);
     stopwatch.Reset();
 }
Example #2
0
 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();
     }
 }