Created
June 2, 2014 13:56
-
-
Save renestein/c989f06155cc2ad46493 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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