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

Add ability to skip internal types when generating for multiple types #225

Closed mattwhitfield closed 1 year ago

mattwhitfield commented 1 year ago

If you are generating for multiple types, all potential types will have tests generated for them. We would like to add the ability to skip internal types during this process.

shshshshgoodnj commented 1 year ago

I owe you for your services. I hope you can skip the TC generation of the internal class. Thank you:)

mattwhitfield commented 1 year ago

This should be available in 0.195 👍 Under 'Generation Options' there is 'Skip internal types on multiple generation' (SkipInternalTypesOnMultipleGeneration in a config file)

mattwhitfield commented 1 year ago

The logic is currently:

If we are generating for more than one source file and the option is enabled, skip internal types

There is an edge case - if one source file has 50 types in it, then it wouldn't filter internal types...

Interested to hear your thoughts on that.

The reason it doesn't always skip them, is because if people right click on a single file and click 'generate tests' but nothing happens then it can be confusing.

shshshshgoodnj commented 1 year ago

It applies well. Thank you :)