Tuesday, November 06, 2007 10:18 PM
Update - 11/9/07: Casey over at Insane World has also created and posted a set of templates for the MSTest framework. Awesome work! Thanks Casey!
One of the very cool features of
ReSharper is the ability to design custom file templates according to your needs. I know, I know, Visual Studio let's you do this as well but it's
much simpler in ReSharper.
And ReSharper's "New Item" list doesn't take 5 minutes to open either...like some other IDEs who shall not be named.
Anyway, I have an empty MbUnit test class template that I use on a daily basis and an NUnit test class template that I designed tonight for an upcoming talk on test driven development. In the spirit of community, I thought that other #Heads out there may be able to benefit from these as well. They're not much, but that extra 60 seconds they can save you every time you start a new test fixture can do wonders for your train of thought when you're deep in the code.
Here's what the NUnit template looks like...
using NUnit.Framework;
namespace MyMoneyDotNet.Tests
{
[TestFixture]
public class HappyPandaTest
{
[Test]
public void First_test()
{
}
}
}
And the MbUnit template...
using MbUnit.Framework;
namespace MyMoneyDotNet.Tests
{
[TestFixture]
public class HappyPandaTest
{
[Test]
public void First_test()
{
}
}
}
Feel free to use these templates for yourself, for your team, or to give them as gifts. I'm granting full license amnesty to these files. You can download them
here.