Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SerenityInAllThings/a48357a023811c210e2ed29cc229d7eb to your computer and use it in GitHub Desktop.
Save SerenityInAllThings/a48357a023811c210e2ed29cc229d7eb to your computer and use it in GitHub Desktop.
VSTudio XUnit Fact Snippet definition
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>XUnitFact</Title>
<Author>SerenityInAllThings</Author>
<Description>Basic XUnit Fact with 3 'A's template</Description>
<Shortcut>xunit</Shortcut>
</Header>
<Imports>
<Import>
<Namespace>Xunit</Namespace>
</Import>
</Imports>
<Snippet>
<Declarations>
<Literal>
<ID>methodbeingtested</ID>
<ToolTip>The method being tested in this fact</ToolTip>
<Default>methodbeingtested</Default>
</Literal>
<Literal>
<ID>situationbeingtested</ID>
<ToolTip>The Situation being tested in this fact</ToolTip>
<Default>situationbeingtested</Default>
</Literal>
<Literal>
<ID>exceptedresult</ID>
<ToolTip>The expect result for this test</ToolTip>
<Default>exceptedresult</Default>
</Literal>
</Declarations>
<Code Language="CSharp">
<![CDATA[[Fact]
public void $methodbeingtested$_$situationbeingtested$_$exceptedresult$()
{
// 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