Eddie Garmon's Weblog

some architecture, some c#

NUnit Template

One of the biggest problems to writing tests (first), is all the redundancy in setting up the test class.Unfortunately NUnit does not have a built in answer to this problem. So to that end, I created several template files to generate these test classes for me when when I do a Project>Add Class from within Visual Studio.Net. I am making my templates available here in hopes that it will help encourage you to write your tests first. Just unzip the download into your VC# install directory (Mine is located at “C:\Program Files\Microsoft Visual Studio .NET 2003\VC#”). Enjoy.

I have also created several other templates, of which I use predominantly: New Class, New Collection. If there is interest, I can post these as well.

Comments

Inge said:

*anything* that will allow easier use of automated unit testing is most apreciated - so go right ahead and post away :)
# November 13, 2003 6:24 AM

Darrell said:

Nice, thanks!
# November 13, 2003 7:42 AM

Yoeri said:

Thanks, can you post the other templates as well ?
It would be very appreciated ...
# November 13, 2003 8:35 AM

guidmaster said:

Sounds great !!!
# November 13, 2003 9:04 AM

Bryan Batchelder said:

I'd certainly like to see your other templates.
# November 13, 2003 10:29 AM

John Lyon-Smith said:

Great stuff! I put together an MSI installer that puts these templates in the correct location, and includes modified templates for both 2002 and 2003. You can get it at http://www.lyon-smith.org/downloads.aspx#nunittemplates
# January 9, 2004 10:58 AM

AnonCoder said:

These links no longer work ... what happened to the templates?

# July 22, 2008 6:54 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)