Should Unit Tests be in their own project in a .Net Solution

前端 未结 5 1690
攒了一身酷
攒了一身酷 2020-12-31 00:52

Should I start a new project for my unit tests? That would mean that I would get two executables correct? Then I am worried about the namespace organization. Would I be able

5条回答
  •  死守一世寂寞
    2020-12-31 01:38

    I tend to have a specific test project/assembly per assembly. The test assembly will have the same name as the assembly it is supposed to test, with the addition of the .Test in the name and the namespace.

    That way, you keep your tests isolated and they do not get deployed with your production code.

提交回复
热议问题