Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save renestein/c7afde35ea297046b6ec to your computer and use it in GitHub Desktop.
Save renestein/c7afde35ea297046b6ec to your computer and use it in GitHub Desktop.
[TestMethod]
public void Run_When_Work_Canceled_And_Zero_Tasks_Then_Method_Returns_Immediately()
{
const double RUN_MAX_DURATION_S = 0.5;
var work = new Work(m_scheduler);
work.Dispose();
var time = StopWatchUtils.MeasureActionTime(() => m_scheduler.Run());
Assert.IsTrue(time.TotalSeconds < RUN_MAX_DURATION_S);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment