Skip to content

Instantly share code, notes, and snippets.

@mario-loza
Created July 7, 2017 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mario-loza/57e1b25f6faf24ef9f931d85a15bf8ef to your computer and use it in GitHub Desktop.
Save mario-loza/57e1b25f6faf24ef9f931d85a15bf8ef to your computer and use it in GitHub Desktop.
Unit Test Stub Snippet for Visual C#
<?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 Stub</Title>
<Description>Stub template for unit test</Description>
<Shortcut>uts</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal Editable="true">
<ID>whatarewetesting</ID>
<Type></Type>
<ToolTip>What functionality are we testing</ToolTip>
<Default>WhatAreWeTesting</Default>
<Function></Function>
</Literal>
<Literal Editable="true">
<ID>expectedresult</ID>
<Type></Type>
<ToolTip>What is the expected correct result</ToolTip>
<Default>ExpectedResult</Default>
<Function></Function>
</Literal>
</Declarations>
<Code Language="csharp" Kind="method decl">
<![CDATA[[TestMethod]
public void $whatarewetesting$_$expectedresult$()
{
//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