Created
August 22, 2019 11:31
-
-
Save rasmuschristensen/06986d0a8eec7666f3b0289ea44dd68d to your computer and use it in GitHub Desktop.
VS snippet
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> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
<Title>NUnit Test Method</Title> | |
<Author>Rasmus Tolstrup Christensen</Author> | |
<Description>Code snippet for a test method</Description> | |
<HelpUrl> | |
</HelpUrl> | |
<Shortcut>ntest</Shortcut> | |
</Header> | |
<Snippet> | |
<Imports> | |
<Import> | |
<Namespace>NUnit.Framework</Namespace> | |
</Import> | |
</Imports> | |
<Declarations> | |
<Literal Editable="true"> | |
<ID>name</ID> | |
<ToolTip>Replace with the name of the test method</ToolTip> | |
<Default>TestMethod</Default> | |
<Function> | |
</Function> | |
</Literal> | |
<Literal Editable="false"> | |
<ID>Test</ID> | |
<ToolTip> | |
</ToolTip> | |
<Default> | |
</Default> | |
<Function>SimpleTypeName(global::NUnit.Framework.Test)</Function> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp" Delimiter="$"><![CDATA[ [$Test$] | |
public void $name$() | |
{ | |
// arrange | |
var answer = 42; | |
// act | |
// assert | |
Assert.That(answer, Is.EqualTo(42), "Some useful error message");$end$ | |
}]]></Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment