I am currently creating an example application in which I am using MS Test to implement a UnitTest project based on a script in VS2012. To do this, I have an abstract script class (base) that has virtual methods Given () - and When () that are executed during the TestInitialization phase. The results of the When () method are then saved and can be checked using arbitrary TestMethods methods in any particular script class that represents "Then'-statements". All of this works great.
There is one more thing that I would like to control: the names of all TestMethods, as they are shown in TestExplorer Visual Studio. This is because many TestMethods have the same or similar names, but run in different scripts (for example, "ExpectedExceptionIsThrown"). I would think that such a thing would be supported by MS Test, perhaps thanks to the built-in support for TestMethodAttribute, for example:
[TestMethod("DisplayName here...")] public void ThenThisShouldHappen() { ... }
I looked at the MS Test API, but cannot find a way to do this. Is this possible when testing MS?
source share