Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
[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