Updated TDD Productivity Plug-in for Resharper

 

I first want to thank JetBrains for being pretty awesome.  I have complained a lot about how they are constantly chaining their APIs to Resharper and as a result it makes keeping plugins very hard to maintain but they went way out of their way to help.  I received and email from one of their developers offering to help on my plugin.  Their was a change made in the latest version of resharp which made my plugin incompatible  and their telemetry showed them a pattern with this problem.  Just this week they made a commit to the source code and updated the project.  I did not have the time to get into the internals of this change and I was really motivated by their help.

As a result, if you were using the plugin I recommend you download the latest version and install it!

Download it Here

For those of you who do not use it yet I will run down the features that are available.

1. Code forward, create a class in a referenced project.

When prompted with Quick Fixes for a non-existent class You get the following menu.  This adds menu items to create the class in all referenced projects.( If this menu does not show up… you may need to add the project references to you unit test project).

 

image

After selecting a menu item.  The class is created in the project you selected but the IDE stays in your test class.  And you are prompted with the quick fix for adding the using for your classes namespace.

image

 

The class file is created in the corresponding project under the correct folder and namespace.  It is that easy!

image

 

 

2. Move Class/Interface to referenced project

If you prefer working with your Class or Interface under test in the same file as your test class and move the class to your referenced project after you get your tests passing this feature will reduce the number of steps it takes to move the class to the referenced project. This eliminates the need to fumble around in the Solution Explorer window.

image

Related Articles:

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

About Eric Hexter

I am the CTO for QuarterSpot. I (co)Founded MvcContrib, Should, Solution Factory, and Pstrami open source projects. I have co-authored MVC 2 in Action, MVC3 in Action, and MVC 4 in Action. I co-founded online events like mvcConf, aspConf, and Community for MVC. I am also a Microsoft MVP in ASP.Net.
This entry was posted in agile, c#, Open Source Software, Resharper, TDD, testing, Tools, Unittests. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Henning Anderssen

    Genious!!
    Just what I’ve been looking for. Thank you so much :D

  • http://kozmic.pl Krzysztof Kozmic

    One feature that the R# does not have, and I think would fit the plugin well would be something that could be called “adjust namespace”
    If you for example move many files around in the project or rename a solution folder, all the files are in namespaces that does not reflect these changes. It would be great if you could update this for all the affected files at once.

  • http://EffectiveAgileDev.com Rod Claar

    Wow, thanks Eric. This is a must have for serious developers.

    I can’t wait to include it in my TDD course!

    http://EffectiveAgileDev.com

  • Guillaume Jay

    Just a question : are you ever planning to do part II of your db4o post ?
    I’m getting interested in db4o, also for the same reasons you gave: prototyping (which in my mind is potentially “using it till it becomes too slow”)

  • http://neverrunwithscissors.com Peter Mounce

    Lovely!

    On first go, though; I have a unit-test class library Foo.Unit.Tests which contains tests for several other class libraries (eg Foo.Core, Foo.Data). I added a class inline to one of the test-class files at the end of the file, not nested into the test-class (my about-to-contain-implementation class). I chose “Move to Foo” – and as expected, the class was moved and a new file created in the correct place. However, the new file namespace’d the class to Foo.Unit.Tests.

    I would prefer that it would change the namespace of the class, as well.

    Cheers!