Write Unit tests into an assembly or in a separate assembly?

后端 未结 5 798
轮回少年
轮回少年 2020-12-16 13:08

When writing unit tests, do you place your tests inside the assembly you wish to test or in a separate test assembly? I have written an application with the tests in classes

5条回答
  •  清歌不尽
    2020-12-16 13:25

    This is widely debated all over the net.

    We use separate assemblies and the InternalsVisibleTo attribute to help the tester assemblies see all the innards of the tested assemblies. We tend to make one test assembly for each assembly we're testing.

提交回复
热议问题