Skip to content

Instantly share code, notes, and snippets.

@dampee

dampee/dunittest.snippet

Last active Dec 21, 2016
Embed
What would you like to do?
Unittest snippet for visual studio
<?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>dunittest</Title>
<Author>
</Author>
<Description>
</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>dunittest</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal Editable="true">
<ID>FunctionUnderTest</ID>
<ToolTip>Function under test</ToolTip>
<Default>FunctionUnderTest</Default>
<Function>
</Function>
</Literal>
<Literal Editable="true">
<ID>ExpectedResult</ID>
<ToolTip>Expected result</ToolTip>
<Default>ExpectedResult</Default>
<Function>
</Function>
</Literal>
<Literal Editable="true">
<ID>UnderCondition</ID>
<ToolTip>Under condition</ToolTip>
<Default>UnderCondition</Default>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="csharp" Kind="method decl"><![CDATA[[TestMethod]
public void $FunctionUnderTest$_$ExpectedResult$_$UnderCondition$()
{
// 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