In the past I used NUnit for all my unit testing needs it was free and worked fine. Creating a test class all I needed to do was to create a class library (dll) and add the needed attributes and start writing my tests.
Now I use Microsoft's testing framework that shipped with Team System as a part of my unit testing solution and every now I make the mistake of creating a class library instead of a Test Project. This time adding MS-Test attribute (TestClass) doesn’t help – Visual Studio doesn’t recognize the test and I can’t run it.
In case you make the mistake of creating a class library instead of a test project you can do one of the two things:
To convert a class library to Test project follow these four simple steps:
Simple isn’t it?
Labels: .NET, MSTest, Tips and Tricks