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, XUnit and many mock frameworks.
This PR tries to slightly improve the user experience by pre-selecting a test project in the "Create Unit Test Boilerplate..." dialog based on the new setting: Test project name format
The default value for the Test project name format is $ProjectName$.Test
The new strategy for pre-selecting the test project is as follows:
1) first try to select a test project if it exactly matches the template
2) if none found, try to get latest selected/cached test project
3) if none found, try to get project that has 'test' in its name
4) if none found, take first of available test projects
Steps 2-4 were there before, but I moved them to dedicated Strategy classes.
Users that want to ignore step 1 can clear out the Test project name format setting.
Another adjustment: as the new setting now makes the setting window slightly larger than the available height, I've also added the ScrollViewer to the corresponding view XAML.
Also, I've added a new token: $ProjectName$, which is only used in a single context. Hope that's okay, otherwise let me know how to make it better.
PS. Thanks for a great project, it really saves us a lot of time!
This PR tries to slightly improve the user experience by pre-selecting a test project in the "Create Unit Test Boilerplate..." dialog based on the new setting:
Test project name format
The default value for the
Test project name format
is $ProjectName$.TestThe new strategy for pre-selecting the test project is as follows: 1) first try to select a test project if it exactly matches the template 2) if none found, try to get latest selected/cached test project 3) if none found, try to get project that has 'test' in its name 4) if none found, take first of available test projects
Steps 2-4 were there before, but I moved them to dedicated Strategy classes. Users that want to ignore step 1 can clear out the
Test project name format
setting.Another adjustment: as the new setting now makes the setting window slightly larger than the available height, I've also added the ScrollViewer to the corresponding view XAML.
Also, I've added a new token: $ProjectName$, which is only used in a single context. Hope that's okay, otherwise let me know how to make it better.
PS. Thanks for a great project, it really saves us a lot of time!