Create a gist now

Instantly share code, notes, and snippets.

This test passes now. Use Extract Method on the indicated block.Then the test fails.
[TestMethod]
public void TestMethod1()
{
var x = 0;
Task.Run(() =>
{
Thread.Sleep(TimeSpan.FromSeconds(1));
x++;
});
{
// Extract Method start
Thread.Sleep(TimeSpan.FromSeconds(2));
Assert.AreEqual(1, x);
// Extract Method end
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment