microsoft / UnitTestBoilerplateGenerator

An extension for Visual Studio that generates a unit test boilerplate from a given class, setting up mocks for all dependencies. Supports NUnit, Visual Studio Test, Moq and SimpleStubs.
MIT License
158 stars 51 forks source link

add "Go to Test" context menu item #36

Open drobertson123 opened 6 years ago

drobertson123 commented 6 years ago

Installed product versions

Description

Please add context menu item in two locations that would take you to the tests.

Expected behavior

Location 1 - Solution Explorer Right click on the class in Solution Explorer menu item to "Go to tests" Opens the Tests Class

Location 2 - Code Editor Right click on Method or Code in Code Editor menu item to "Go to test" Opens the Tests Class at the test method for that method

drobertson123 commented 6 years ago

Hopefully, I am not coming off as needy on these. I really appreciate the work you have done. These ideas are just things I have been thinking would be great additions. Simple things (hopefully) that speed up workflow.

Thanks

RandomEngy commented 6 years ago

Would need a bit of extra thought. Currently we just let the user pick the project to add the test to. We don't have any intrinsic knowledge of where the tests should be for a given project. It would need to be inferred based on which project the user picks, stored and exposed in settings. Also the "go to method" would need to be able to dynamically examine the test to figure out when the method is invoked. Would be doable with Roslyn APIs...

It certainly would be useful, and ideas are always appreciated. Not sure when I would be able to get to this one, but pull requests are always a fast way to get something in. :)

drobertson123 commented 6 years ago

I didn't realize the complexity. It would be nice to have but not any kind of critical issue. -Thanks