Last active
May 18, 2017 07:06
-
-
Save Stephanvs/ab667d74676df1578d4e69365596aea8 to your computer and use it in GitHub Desktop.
Asynchronous Unit MSTest Code Snippet for Visual Studio
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>Async Test Method</Title> | |
<Shortcut>testa</Shortcut> | |
<Description>Code snippet for an async test method</Description> | |
<Author>Stephanvs.com</Author> | |
</Header> | |
<Snippet> | |
<Imports> | |
<Import> | |
<Namespace>System.Threading.Tasks</Namespace> | |
<Namespace>Microsoft.VisualStudio.TestTools.UnitTesting</Namespace> | |
</Import> | |
</Imports> | |
<Declarations> | |
<Literal> | |
<ID>name</ID> | |
<ToolTip>Replace with the name of the test method</ToolTip> | |
<Default>MyTestMethodAsync</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 async Task $name$() | |
{ | |
$end$ | |
}]]></Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment