I'm Actually using Visual Studio 2010. This is the first time I would like to test the Manager and Data persistence Class for my project using MSTest. I used DataSets to persist my data in the database and I wrote some Manager to simplify my work. So, I added a Test Project to check for the Manager if it's work correctly. But the problem I cannot add a reference to the project test : The project list is Empty. I tried to add the Test Project in my Project Folder and Outside the Project Folder but is the same problem.
2 Answers
Your data persistence and business logic classes should be in separate class libraries. You can then unit test those libraries.
You should also avoid the use of web site "projects". Use web application projects instead - just use File->New Project instead of File->New Web Site. Web site "projects" are unlike every other kind of project in Visual Studio, and should only be used for the simplest development scenarios.
Using unit tests makes them not simple any more.
2 Comments
Check your target frameworks - it could be that your test project and your library projects are using different versions of .NET Framework...