In a typical Java IDE (say Intellij), working Test Driven Development (TDD) style mean a very efficient workflow and virtually no modifications or alternations are needed after you finish the code through the test.
Java projects, just as C# solutions, have various styles of separating production code from test code, but usually there are two directory structures in parallel
- src
- test
or the tests are separated by namespace in the src tree. And then endless variations on that theme.
Using something like Intellij I can create my "test class/method", start coding, generate objects on the fly, as I go, and they generally end up in the correct place, that is, where the production code is supposed to be. When I'm done, I'm done done. Tools and IDE's in the Java world support this 110%.
Now the experience Visual Studio (or actually the R# experience). Currently my (simplified) workflow for doing TDD in C# is something like this (using R#):
- Create a test class in a test project
- Create test method
- Start coding.. generate classes, interfaces, etc as I go. I generate the code in the same file as the test-class as per R# default. ...
- When I'm done I go to each class/interface/whatever and move the files into separate files matching their name (ctrl+enter action).
- Go to solution explorer and drag-drop the classes from the test-project over to the production project.
I want to get rid of everything 4 & 5. And I would also like my classes to generate directly in the production project in step 3.
I've searched high and low for an extension to Visual Studio that can help me with this.
Question 1: How can I get more productive with TDD the way I do it today?
Question 2: Should I adopt another TDD workflow/structure that would ultimately provide me with a better TDD experience in Visual Studio? (this is an alternative question)
Remain unanswered But please take the time to vote for this feature in Resharper https://youtrack.jetbrains.com/issue/RSRP-424370