Last active
February 23, 2023 11:39
-
-
Save teshiba/42feb473adceeb347b41a6331cda7319 to your computer and use it in GitHub Desktop.
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> | |
<Title>ArrangeActAssert</Title> | |
<Shortcut>test</Shortcut> | |
<Description>Code snippet for unit test Arrang, Act and Assert statement</Description> | |
<Author>Satoshi Teshiba</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
<SnippetType>SurroundsWith</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal> | |
<ID>expected</ID> | |
<ToolTip>expected value</ToolTip> | |
<Default>expectedValue</Default> | |
</Literal> | |
<Object> | |
<ID>method</ID> | |
<ToolTip>tested method</ToolTip> | |
<Default>ToString()</Default> | |
</Object> | |
<Literal> | |
<ID>actual</ID> | |
<ToolTip>actual value</ToolTip> | |
<Default>actualValue</Default> | |
</Literal> | |
<Literal> | |
<ID>classname</ID> | |
<ToolTip>Class name</ToolTip> | |
<Function>ClassName()</Function> | |
<Default>ClassNamePlaceholder</Default> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"> | |
<![CDATA[// Arrange | |
var $expected$ = string.Empty; | |
// Act | |
var testClass = new $classname$(); | |
var $actual$ = testClass.$method$; | |
// Assert | |
Assert.AreEqual($expected$, $actual$);]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment