Display test class name in text explorer in Visual Studio 2012 using C # and xUnit

I use xUnit with a built-in text explorer in visual studio 2012. It would be nice to specify the test name with the class name, so if I have, for example,

namespace Foo.Bar { class CatTests { [Fact] public void Test1(){ } } } 

I would look in the test explorer

 Foo.Bar.CatTests.Test1 

as the name of the test. Is this possible anyway? At the moment I only see

 Test1 

which is pain if I have many Test1 cases spread across multiple namespaces and test classes.

+6
source share
1 answer

We are currently using FactAttribute DisplayName:

 [Fact(DisplayName = "Foo.Bar.CatTests.Test1")] 

It does not seem that this can be done automatically, but, of course, it would be nice if that happened.

+1
source

All Articles