Created
January 14, 2013 14:40
-
-
Save mhinze/4530502 to your computer and use it in GitHub Desktop.
A template for "test case path per fixture" test organization pattern from http://xunitpatterns.com/Testcase%20Class%20per%20Fixture.html
This file contains hidden or 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
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Should; | |
namespace $NAMESPACE$ | |
{ | |
[TestClass] | |
public class TestCaseClassPerFixtureTemplate | |
{ | |
public static string actual; | |
[ClassInitialize] | |
public static void When_some_context(TestContext unused) | |
{ | |
actual = "Set up and invoke behavior under test"; | |
} | |
// one logical assertion per test method | |
[TestMethod] | |
public void Should_make_asserion_1() | |
{ | |
actual.ShouldNotBeNull(); | |
} | |
[TestMethod] | |
public void Should_make_assertion_2() | |
{ | |
actual.ShouldStartWith("Set up"); | |
} | |
// etc. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment