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

Cannot set the default template #21

Closed lenssoliang closed 6 years ago

lenssoliang commented 7 years ago

Installed product versions

Description

In general, I need use the template of NSubstitude as the default. But it will always use the template of Moq. And I cannot change it on the options.

Could you consider add to support change the default template to use?

RandomEngy commented 7 years ago

It should automatically detect the NSubstitute reference in the project you're adding the test to and choose that template. Could you share your .csproj file so I can fix the auto-detect code? I may also add an "override" for people to force a certain mode or template...

RandomEngy commented 6 years ago

In 1.5.12 I fixed an issue with the auto-detect code for .NET Core projects, and added a choice to override the test framework or mock framework when generating the class.