Created
June 28, 2017 06:08
-
-
Save dburriss/9f7e3a46f030aab706304a7bc01433e4 to your computer and use it in GitHub Desktop.
An XUnit fact snippet for Visual Studio. Navigate to Tool > Code Snippets Manager... (or press Ctrl+K, Ctrl+B)
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> | |
<Title>XUnit Fact method</Title> | |
<Author>Devon Burriss</Author> | |
<Description>Creates a method that will run as an XUnit test (fact).</Description> | |
<Shortcut>fact</Shortcut> | |
</Header> | |
<Imports> | |
<Import> | |
<Namespace>Xunit</Namespace> | |
</Import> | |
</Imports> | |
<Snippet> | |
<Declarations> | |
<Literal> | |
<ID>unit</ID> | |
<ToolTip>Name of the unit under test.</ToolTip> | |
<Default>Unit</Default> | |
</Literal> | |
<Literal> | |
<ID>scenario</ID> | |
<ToolTip>Scenario this test exercises.</ToolTip> | |
<Default>Scenario</Default> | |
</Literal> | |
<Literal> | |
<ID>expected</ID> | |
<ToolTip>Expected result of this test.</ToolTip> | |
<Default>Expected</Default> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"> | |
<![CDATA[ | |
[Fact] | |
public void $unit$_$scenario$_$expected$() | |
{ | |
$end$ | |
} | |
]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment