Visual Studio xUnit TestMethod Snippet

A snippet that scaffolds a Fact Testmethod.
Add the snipper to Visual Studio, in a .cs file type xTest (the shortcut) and press tab twice.

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="">
	<CodeSnippet Format="1.0.0">
			<Title>xUnit Fact Method</Title>
			<Description>Code snippet for creating a Test Method with xUnit</Description>
			<Author>Ben Beckers</Author>
					<ToolTip>The name of the Method to test on the SUT</ToolTip>
					<ToolTip>Valid or invalid or null,...</ToolTip>
					<ToolTip>What the outcome of the test should be</ToolTip>
			<Code Language="csharp"><![CDATA[[Fact]
			public void $UnitOfWork$_$StateUnderTest$_$ExpectedBehavior$()



Leave a Reply