Skip to content

Instantly share code, notes, and snippets.

@mathew-odwyer
Created October 7, 2025 07:48
Show Gist options
  • Select an option

  • Save mathew-odwyer/73dd09c8a01b3db8ba8a49028f8764cd to your computer and use it in GitHub Desktop.

Select an option

Save mathew-odwyer/73dd09c8a01b3db8ba8a49028f8764cd to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>NUnit Test Method</Title>
<Shortcut>testmethod</Shortcut>
<Description>Creates an NUnit test method template</Description>
<Author>Your Name</Author>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>methodName</ID>
<Default>MethodName</Default>
</Literal>
<Literal>
<ID>expectedBehaviour</ID>
<Default>ExpectedBehaviour</Default>
</Literal>
<Literal>
<ID>condition</ID>
<Default>Condition</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[
[Test]
public void $methodName$Should$expectedBehaviour$When$condition$()
{
// Arrange
// Act
// Assert
}
]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment