I've a c# visual studio project in which i make tests with xunit.
Now the test explorer shows tests by their namespaces like this:
I don't want that redundant cluttering in the test names.
I know I can annotate the methods to set testnames like this:
public class WhenCreating : GivenConnection
{
[Fact(DisplayName = nameof(GivenConnection) + "." + nameof(WhenCreating ) + "." + nameof(ItAppliesFromCity))]
public void ItAppliesFromCity()
But this is still very redundant as I would have to annotate each method with the same prefix. Is there any way to influence the test name generation? Like ParentClass.SubClass.Method
?
update: To write it more expressive: i still want to have the name of the parent-class(es) in the test names. not only the method name which can be done via app.config