Skip to content

Commit

Permalink
Added Is test
Browse files Browse the repository at this point in the history
  • Loading branch information
OsirisTerje committed Oct 9, 2023
1 parent fc5cc5c commit 62c1336
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Issue4281/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,21 @@ public void TestThrows()
{
Assert.That(()=>ThrowingMethod(), Throws.TypeOf<ArgumentException>());
}


[Test]
public void TestDelayed()
{
stopWatch.Start();
Assert.That(()=>Count(),Is.GreaterThan(10).After(2).Seconds.PollEvery(500));
}

private int Count()
{
var ts = stopWatch.Elapsed;
TestContext.WriteLine("RunTime " + $"{ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}.{ts.Milliseconds / 10:00}");
TestContext.WriteLine($"TestDelayed: {count}");
TestContext.WriteLine($"------------------");
return ++count;
}
}

0 comments on commit 62c1336

Please sign in to comment.