-
-
Save dampee/b99666c5f5f43ab3a3d1882a250618ef 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
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Unit Test Method</Title> | |
<Author>Siôn J. Lewis</Author> | |
<Description>Adds a unit test method with comments based on the AAA (Arrange,Act,Assert) pattern</Description> | |
<HelpUrl>https://msdn.microsoft.com/en-us/library/ms165394.aspx</HelpUrl> | |
<Shortcut>utest</Shortcut> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal Editable="true"> | |
<ID>MethodName</ID> | |
<ToolTip>Method name: e.g. IsStrawberryRed</ToolTip> | |
<Default>MethodName</Default> | |
<Function> | |
</Function> | |
</Literal> | |
<Literal Editable="true"> | |
<ID>Condition</ID> | |
<ToolTip>Condition: e.g. WhenRipe</ToolTip> | |
<Default>Condition</Default> | |
<Function> | |
</Function> | |
</Literal> | |
<Literal Editable="true"> | |
<ID>ExpectedResult</ID> | |
<ToolTip>Expected result: e.g. True</ToolTip> | |
<Default>ExpectedResult</Default> | |
<Function> | |
</Function> | |
</Literal> | |
</Declarations> | |
<Code Language="CSharp" Kind="method decl"><![CDATA[[TestMethod] | |
public void $MethodName$_$Condition$_$ExpectedResult$() | |
{ | |
// Arrange | |
$end$ | |
// Act | |
// Assert | |
Assert.Fail(); | |
}]]></Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment