My xUnit.net Visual Studio Code Snippets

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

ShortcutSnippet
aeAssert.Equal($expected$,$actual$)
aneAssert.NotEqual($expected$,$actual$)
anAssert.Null($actual$)
annAssert.NotNull($actual$)
atAssert.True($actual$)
afAssert.False($actual$)

You can download these here: xUnit.net Snippets.   Enjoy!

This entry was posted in C#, Snippets, Visual Studio. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>