Pro Tip: Being more productive with ReSharper Live Templates

Whilst watching a @tekpub video about Roy Osherove’s TDD Masterclass I saw a tip he gave where he showed how to create a ReSharper Live Template to save time and be more productive, although this was related to TDD you can create your own user template for anything you like, this tip is for creating NUnit test methods but the main thing is the idea, here is what he showed:-

1 – Install ReSharper.
2 – Then from within Visual Studio, select ReSharper–> Live Templates.
3 – Check the box next to User Templates and then, click the Add icon or select New Template.
4 – Give the Template a name and then enter content as the below screenshot:-

Test Template

Once this is saved if you back to your class and type test and then hit the tab key you’ll see the empty [Test] method generated and it asks you to supply the name.

Try this out and you will soon see the potential time savers you can come up with.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s