I need to add unit tests for an existing solution with a lot of projects. Building the project takes a long time, so I decided to create another seperate solution for unit test projects. I don’t know what’s better: reference to dll or include in unit test solutions existing projects that I want to test.
How should I organize my test cases, and why? Please base answers on your own direct experiences.
I strongly suggest that you include the project you want to test in the solution and reference that project.
In one big project I referenced only the DLLs and had a lot of problems with the unit tests testing old versions of the DLLs, because building the unit test project didn’t automatically trigger a build of the project it tests.