Skip to content

Instantly share code, notes, and snippets.

@lomholdt
Forked from bvli/afact.snippet
Created October 5, 2018 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lomholdt/7e694ab127a17004f79708bef78462ff to your computer and use it in GitHub Desktop.
Save lomholdt/7e694ab127a17004f79708bef78462ff to your computer and use it in GitHub Desktop.
Fact snippets
<?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>A Fact</Title>
<Shortcut>afact</Shortcut>
<Description>Code snippet for an async xUnit fact</Description>
<Author>Bjarke Lindberg</Author>
</Header>
<Snippet>
<Imports>
<Import>
<Namespace>System.Threading.Tasks</Namespace>
<Namespace>Xunit</Namespace>
</Import>
</Imports>
<Declarations>
<Literal>
<ID>name</ID>
<ToolTip>Replace with the name of the xUnit fact</ToolTip>
<Default>It_</Default>
</Literal>
<Literal Editable="false">
<ID>Fact</ID>
<Function>SimpleTypeName(global::Xunit.Fact)</Function>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[[$Fact$]
public async Task $name$()
{
$end$
}]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
<?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>Fact</Title>
<Shortcut>fact</Shortcut>
<Description>Code snippet for a xUnit fact</Description>
<Author>Bjarke Lindberg</Author>
</Header>
<Snippet>
<Imports>
<Import>
<Namespace>Xunit</Namespace>
</Import>
</Imports>
<Declarations>
<Literal>
<ID>name</ID>
<ToolTip>Replace with the name of the xUnit fact</ToolTip>
<Default>It_</Default>
</Literal>
<Literal Editable="false">
<ID>Fact</ID>
<Function>SimpleTypeName(global::Xunit.Fact)</Function>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[[$Fact$]
public void $name$()
{
$end$
}]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment