Last active
February 5, 2016 13:20
-
-
Save tdshipley/edabf4b7ff690e420e26 to your computer and use it in GitHub Desktop.
An example of why using a Setup and Teardown method in tests can be bad from: http://jamesnewkirk.typepad.com/posts/2007/09/why-you-should-.html
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
[TestFixture] | |
public class MyTests | |
{ | |
[SetUp] | |
public void BeforeTest() | |
{ | |
Console.WriteLine("BeforeTest"); | |
} | |
[TearDown] | |
public void AfterTest() | |
{ | |
Console.WriteLine("AfterTest"); | |
} | |
[Test] | |
public void Test1() | |
{ | |
Console.WriteLine("Test1"); | |
} | |
[Test] | |
public void Test2() | |
{ | |
Console.WriteLine("Test2"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment