mattwhitfield / Unitverse

A unit test generation extension for Visual Studio that aims to always produce code that compiles - covering the basic cases automatically and preparing as much as it can for the complex cases.
MIT License
89 stars 20 forks source link

Configuration is ignored #192

Closed guitoux1 closed 1 year ago

guitoux1 commented 1 year ago

Hi,

I have a issue with the extension.

I first have the following settings : image

I then create a unit test file and it generate what I expected : image

I then change the settings to : image

I delete the test file, restart VS2022 and re-generate the tests (using shift+right click), but still I got the same result has if my configuration haven't change. Looking at the settings, they are set to false, but act as they still were set to true

mattwhitfield commented 1 year ago

I can't repro this easily - so for some clarification:

Does this only happen on regenerate? Does this only happen on certain projects? If you hold Control while clicking on Generate Tests - it will show you the configuration source for the option in question - could you paste me a picture of that?

Thanks!

mattwhitfield commented 1 year ago

Just to clarify - when you hold down Control and click on the Generate Tests menu item, you get the UI. Then, in the UI, you can go to generation options. Hovering the icon next to each option tells you where the config came from:

image

guitoux1 commented 1 year ago

Hi,

Ok I found what happened thanks to the Ctrl+Click : My configuration was : image And it still was using AutoFixture and Autofixture+Moq

Then I change the configuration to : image

ANd then it works. So the Auto-detect Frameworks options takes pecedence on the others settings

Thanks for your help

mattwhitfield commented 1 year ago

Ok, great, thanks for the update. If you don't mind, I'll leave this issue open - because I just want to check if the docs could be clearer, and if there's anything that could be logged in the output window that would help. 👍