Last active
December 16, 2015 02:39
-
-
Save GeorgeDellinger/5363936 to your computer and use it in GitHub Desktop.
ContextSpecification File Template
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
| namespace $NAMESPACE$ | |
| { | |
| /// <summary> | |
| /// Base class for BDD-style tests. | |
| /// </summary> | |
| /// <remarks> | |
| /// Taken from: http://blogs.msdn.com/b/elee/archive/2009/01/20/bdd-with-mstest.aspx | |
| /// See also: http://dannorth.net/introducing-bdd/ | |
| /// </remarks> | |
| public abstract class ContextSpecification | |
| { | |
| public TestContext TestContext { get; set; } | |
| [TestInitialize] | |
| public void TestInitizlize() | |
| { | |
| Context(); | |
| BecauseOf(); | |
| } | |
| [TestCleanup] | |
| public void TestCleanup() | |
| { | |
| Cleanup(); | |
| } | |
| protected virtual void Context() | |
| { | |
| } | |
| protected virtual void BecauseOf() | |
| { | |
| } | |
| protected virtual void Cleanup() | |
| { | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment