Last active
May 31, 2023 01:51
-
-
Save dampee/032cd06ed426bf15bea596050f7a96a8 to your computer and use it in GitHub Desktop.
Unittest snippet for visual studio
This file contains hidden or 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>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