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

Supress generation of PropertyTester #164

Closed Mazzelfassel closed 1 year ago

Mazzelfassel commented 1 year ago

Describe the solution you'd like Configure if a PropertyTester class is added, when new Tests are generated.

Additional context If a class implements INotifyPropertyChanged a PropertyTester.cs file is automatically added to the test project if it not already exists. In my Solution I have a Test-Utility Project providing classes and functions (including the PropertyTester) that are used by all test projects. Currently I always have to delete the PropertyTester manually after generating new tests.

mattwhitfield commented 1 year ago

This is resolved in 0.160 - you can uncheck the 'Create target assets' option in the UI or set CreateTargetAssets=false in a .unitTestGeneratorConfig file.

Please let me know if that works for you 👍

Mazzelfassel commented 1 year ago

I have tested this option with the UI and with a .unitTestGeneratorConfig file. In both cases a PropertyTester.cs was generated, so it seems that this option did not work. Restarting Visual Studio also did not yield any different results. Im currently using VS2022 and have confirmed that version 0.160 is installed.

mattwhitfield commented 1 year ago

Ok, I must have missed something 🧩 Leave it with me 👍

mattwhitfield commented 1 year ago

So, as it turns out, I'm just an idiot 🤣 0.161 will be out shortly.

Mazzelfassel commented 1 year ago

Tested it and it works as intended :thumbsup: