TDD Bliss
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!
The latest EAP … 213
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…
[...] 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: [...]
[...] 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 [...]



Hey Matt, what version of Resharper are you using?