4 comments

Common are you serious, no TDD experts out there that do TDD with ReSharper that can tell me sure, ther'es a shortcut to get to the window that allows you to generate a class to a specific project or location or whatever?  I mean I know there has to be people using ReSharper's generate class to specific project capability right?  And I know you don't always use your mouse to go to the top ReSharper menu to get to that (that would be ridiculous).

So what's the shortcut to get to this?  Or even better a shortcut to set what project you want all your production code you generate off specific tests in your test project to go to for a while so you don't have to keep telling it every time what C# project to generate production code for certain tests?

0

The "Generate" menu that you're showing in your screen shot is a Visual Studio feature, not a ReSharper one.

The ReSharper Way is (of course!) alt+enter on the undefined class name, and create a class from there. ReSharper has no context on where the class should be (is it a production class? Test class?) so it creates it in the same file. Alt+enter on the class name allows you to move it to a new file, or you can use the Move refactor (F6 for IntelliJ scheme, ctrl+R, O for VS) to move the class to a new file, folder, namespace or project.

Alternatively, you can use alt+insert when the solution explorer has the focus and create a Class, Struct, Enum, Interface, etc (and this list can be edited and modified from the Templates Explorer). You can also use ctrl+alt+insert to create a file from a template next to the current file, but that will also most likely need to be moved into your production code.

And finally, you can of course use the "class" Live Template to create a class in the current file, although you'll need to type in the name yourself.

Hope this helps!
Matt

0

thanks sir.  I forgot to reply that I did find this last night

http://tv.jetbrains.net/videocontent/efficient-navigation-when-doing-tddbdd-with-resharper

it's based on R# 5 though.  So I couldn't find a shortcut for the generate to another file part at the end, didn't work in terms of offering up that intermediate window to allow you to choose the project to move it to.

0

You know what would be nice?  more videos on the jetbrains tv page for R#, feels out of date.

0

Please sign in to leave a comment.