Skip to content

Instantly share code, notes, and snippets.

@JayBazuzi
Last active August 29, 2015 14:12
Show Gist options
  • Save JayBazuzi/39be261001c002390d79 to your computer and use it in GitHub Desktop.
Save JayBazuzi/39be261001c002390d79 to your computer and use it in GitHub Desktop.
int X = 0;
Task.Run(() =>
{
Thread.Sleep(TimeSpan.FromSeconds(1));
X++;
});
{// Extract Method on this block
Thread.Sleep(TimeSpan.FromSeconds(2));
Assert.AreEqual(1, X);
}
@JayBazuzi
Copy link
Author

This test passes until you Extract Method as indicated.

@JayBazuzi
Copy link
Author

Updated to be simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment