logo
  • Jobs
  • About Me
  • Contact
  • Home
« NUnit 2.2.4 Production Release
The Spirit of Christmas »

TDD Bliss

Posted December 17th, 2005 by Matt Berther

Another reason why Resharper is such a godsend, and why no developer’s desktop should be without it. Live Templates…

A major frustration with doing TDD is the repetetive nature of the code.

[Test]
public void SomeTest()
{
}

or

using NUnit.Framework;
 
namespace SomeNamespace
{
    [TestFixture]
    public class SomeFixture
    {
        [Test]
        public void SomeTest()
        {
        }
    }
}

How many times during the day do you type this? If you’re doing TDD, Im going to guess that it is quite a bit.. How much better would it be if you could type ‘test’ and hit TAB. Once you hit Tab, the method name is highlighted and you type the method name. After the method name is complete, hit TAB again and you’re in the body. Ahhhh… TDD nirvana. :)

I’ve attached my live templates for resharper that do exactly this. Type in ‘test’ to get the simple unit test, or type ‘tf’ and TAB to get the test fixture.

Get the live templates (zip | xml)

Once you’ve downloaded them, you should be able to import them into Resharper using the Resharper options dialog and be on your way to TDD bliss. Enjoy!

This entry was posted on Saturday, December 17th, 2005 at 11:31 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Haacked
December 18th, 2005

Hey Matt, what version of Resharper are you using?

Matt Berther
December 18th, 2005

The latest EAP … 213

public MattBerther : ISerializable
January 25th, 2006

A few more live templates

A few weeks ago, I talked about TDD bliss and showed some live templates that I had created for Resharper to relieve some of the more mundane parts of writing unit tests. The original version of the templates included only…

Luke Melia » On Pairing Etiquette
October 10th, 2006

[...] Here, here to number 3. I’d add that you need the TDD LiveTemplates for Resharper that Matt Berther put together or your team’s equivalent. Call me impatient, but why do I need to wait for you to type: [...]

Elegant Code » Including Tests into the Original Assembly
July 22nd, 2007

[...] with discovering bugs in my class constructors. I am using ReSharper’s NUnit support + Matt Berther’s excellent TDD Live Templates over MSUnit, which is a whole post in [...]

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
-->

flag
Favorite Charity
wounded warrior project
Search
Social
  • mattberther on twitter
  • mattberther on linkedin
Syndication
Archives
  • December 2008
  • November 2008
  • September 2008
  • August 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • May 2005
  • April 2005
  • March 2005
  • February 2005
  • January 2005
  • December 2004
  • November 2004
  • October 2004
  • September 2004
  • August 2004
  • July 2004
  • June 2004
  • May 2004
  • April 2004
  • March 2004
  • February 2004
  • January 2004
  • December 2003
  • November 2003
  • October 2003
  • September 2003
  • August 2003
  • July 2003
  • June 2003
  • May 2003
  • April 2003
  • March 2003
Jobs
mattberther.com © 2003 - 2009