Created
September 14, 2011 09:52
-
-
Save Krizzzn/1216220 to your computer and use it in GitHub Desktop.
VisualStudio: Test Method Snippet
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
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
<Title>Test Method</Title> | |
<Shortcut>testm</Shortcut> | |
<Description>Code snippet for a test method</Description> | |
<Author>Microsoft Corporation and Krizzzn</Author> | |
</Header> | |
<Snippet> | |
<Imports> | |
<Import> | |
<Namespace>Microsoft.VisualStudio.TestTools.UnitTesting</Namespace> | |
</Import> | |
</Imports> | |
<References> | |
<Reference> | |
<Assembly>Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll</Assembly> | |
</Reference> | |
</References> | |
<Declarations> | |
<Literal> | |
<ID>methodname</ID> | |
<ToolTip>Replace with the methodname of the method, you want to test</ToolTip> | |
<Default>MyMethod</Default> | |
</Literal> | |
<Literal> | |
<ID>name</ID> | |
<ToolTip>Replace with the name of the test method</ToolTip> | |
<Default>should_do_things</Default> | |
</Literal> | |
<Literal Editable="false"> | |
<ID>TestMethod</ID> | |
<Function>SimpleTypeName(global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod)</Function> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"><![CDATA[[$TestMethod$] | |
public void $methodname$__$name$() | |
{ | |
/// ARRANGE | |
$end$ | |
/// ACT | |
/// ASSERT | |
}]]></Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Location in file System: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Test