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
Generating unit test on wrong unit test project #50
When creating a unit test using the UnitTestBoilerplateGenerator, it generates the unit test for the first relative path in a specified unit test project inside the solution. Not always it will be right.
For example, I have the following projects in my solution:
Something.Api
Something.Api.Client
Something.Api.Client.UnitTests
Something.Api.UnitTests
When generating a unit test for Something.Api project, it will generate in Something.Api.Client.UnitTests.
Steps to recreate
Create the example projects: Something.Api, Something.Api.Client, Something.Api.Client.UnitTests, Something.Api.UnitTests
Right-click an item in Something.Api and choose "Create Unit Test Boilerplate"
Current behavior
Right-click an item in Something.Api and choose "Create Unit Test Boilerplate" . It generates a unit in Something.Api.Client.UnitTests.
Expected behavior
Right-click an item in Something.Api and choose "Create Unit Test Boilerplate" . It generates a unit in Something.Api.UnitTests.
Installed product versions
Description
When creating a unit test using the
UnitTestBoilerplateGenerator
, it generates the unit test for the first relative path in a specified unit test project inside the solution. Not always it will be right.For example, I have the following projects in my solution:
When generating a unit test for
Something.Api
project, it will generate inSomething.Api.Client.UnitTests
.Steps to recreate
Something.Api
,Something.Api.Client
,Something.Api.Client.UnitTests
,Something.Api.UnitTests
Something.Api
and choose "Create Unit Test Boilerplate"Current behavior
Right-click an item in
Something.Api
and choose "Create Unit Test Boilerplate" . It generates a unit inSomething.Api.Client.UnitTests
.Expected behavior
Right-click an item in
Something.Api
and choose "Create Unit Test Boilerplate" . It generates a unit inSomething.Api.UnitTests
.