Closed AdaTheDev closed 1 year ago
This is resolved in 0.160 - you can set 'Test type base class' and 'Test type base class namespace' in the UI or set TestTypeBaseClass=MyClassName
and TestTypeBaseClassNamespace=My.Awesome.Namespace
in a .unitTestGeneratorConfig
file.
You can operate it one of two ways - you can either specify a fully qualified type name in TestTypeBaseClass
and leave TestTypeBaseClassNamespace
blank, or you can specify a type name only in TestTypeBaseClass
and put the namespace in TestTypeBaseClassNamespace
, in which case it will emit a using for the namespace.
They are just strings - there isn't anything that does type lookups or validation on what's entered - so just be aware that it's possible to put rubbish in there and the tool really won't be any the wiser. 👍
This is awesome. Thanks. Already being put to good use 👍
It would be great to have an option under "Generation Options" to specify a base class from which generated unit test classes should derive from. This would help scenarios where currently, you have to manually inherit from a base class post-generation - not a huge inconvenience, but 1 less thing to cover when onboarding a team to the tool (of awesomeness).