My xUnit.net Visual Studio Code Snippets

Published 02 March 09 03:58 PM | MattManela 

The xUnit .Net codeplex page lists one useful Visual Studio code snippet for creating a Fact.  As you can tell I am fairly fond of code snippets so I created a few more which I use when writing xUnit.net facts. These are one line snippets that I find very convenient when writing my assertions.

Below is a table which shows the shortcut you use to access the snippet and the code the snippet generates

Shortcut Snippet
ae Assert.Equal($expected$,$actual$)
ane Assert.NotEqual($expected$,$actual$)
an Assert.Null($actual$)
ann Assert.NotNull($actual$)
at Assert.True($actual$)
af Assert.False($actual$)

I have included a zip containing these snippets.   Enjoy!

Filed under: , ,
Attachment(s): xUnitSnippets.zip

Comments

# DotNetKicks.com said on March 3, 2009 8:35 PM:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Anonymous comments are disabled

About MattManela

I am a software developer at Microsoft. My blog is http://blogs.msdn.com/matt
Page view tracker