Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save renestein/c989f06155cc2ad46493 to your computer and use it in GitHub Desktop.
Save renestein/c989f06155cc2ad46493 to your computer and use it in GitHub Desktop.
[TestMethod]
public void Run_When_One_Task_Added_Then_Returns_One()
{
const int NUMBER_OF_SCHEDULED_TASKS = 1;
m_scheduler.Dispatch(() =>
{
});
var result = m_scheduler.Run();
Assert.AreEqual(NUMBER_OF_SCHEDULED_TASKS, result);
}
[TestMethod]
public void Run_When_One_Task_Added_Then_Task_Is_Executed()
{
bool wasTaskCalled = false;
m_scheduler.Dispatch(() =>
{
wasTaskCalled = true;
});
m_scheduler.Run();
Assert.IsTrue(wasTaskCalled);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment