Created
May 6, 2018 15:13
-
-
Save angelovstanton/96f836c8c3cfad96c546adce0490b7b4 to your computer and use it in GitHub Desktop.
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
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace MSTestUnitTests | |
{ | |
// A class that contains MSTest unit tests. (Required) | |
[TestClass] | |
public class YourUnitTests | |
{ | |
[AssemblyInitialize] | |
public static void AssemblyInit(TestContext context) | |
{ | |
// Executes once before the test run. (Optional) | |
} | |
[ClassInitialize] | |
public static void TestFixtureSetup(TestContext context) | |
{ | |
// Executes once for the test class. (Optional) | |
} | |
[TestInitialize] | |
public void Setup() | |
{ | |
// Runs before each test. (Optional) | |
} | |
[AssemblyCleanup] | |
public static void AssemblyCleanup() | |
{ | |
// Executes once after the test run. (Optional) | |
} | |
[ClassCleanup] | |
public static void TestFixtureTearDown() | |
{ | |
// Runs once after all tests in this class are executed. (Optional) | |
// Not guaranteed that it executes instantly after all tests from the class. | |
} | |
[TestCleanup] | |
public void TearDown() | |
{ | |
// Runs after each test. (Optional) | |
} | |
// Mark that this is a unit test method. (Required) | |
[TestMethod] | |
public void YouTestMethod() | |
{ | |
// Your test code goes here. | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment