Instantly share code, notes, and snippets.

What would you like to do?
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="">
<CodeSnippet Format="1.0.0">
<Title>Unit Test</Title>
<Author>Rusty Divine</Author>
<Description>Unit Test Template with 3 Parts</Description>
<SnippetTypes />
<Keywords />
<References />
<Imports />
<Literal Editable="true">
<ToolTip>Name of the unit of work or scenario under test</ToolTip>
<Literal Editable="true">
<Literal Editable="true">
<ToolTip>What your expected result is</ToolTip>
<Code Language="csharp" Kind="method decl" Delimiter="$"><![CDATA[[TestMethod]
public void $uow$_$initialcondition$_$expectedresult$()

This comment has been minimized.


osmyn commented Jul 31, 2016

Save this snippet in:

%USERPROFILE%\Documents\Visual Studio 2015\Code Snippets\Visual C#\My Code Snippets\

Name your snippet something like unittest.snippet.

In Visual Studio, you will then just type ut and hit tab twice to use this snippet.

If you have Resharper installed, you will either need to switch back to Visual Studio Intellisense in Resharper's options or use Ctrl+K, X to bring up the snippet menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment