样品code框架的的AssemblyInfo.cs
:
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo
("Test.Company.Department.Core")]
这是一个不好的做法?
没有,它不被视为不好的做法。有没有别的办法,如果你想测试这些类是内部的组件很好的理由。只是没有测试他们会差很多。
No, it is not considered bad practice. There is no other way, if the classes you want to test are internal to your assembly for good reasons. Just not testing them would be a lot worse.
上一篇:DefaultIfEmpty在LINQDefaultIfEmpty、LINQ
下一篇:我如何获得图像的各种MessageBoxImage(S)或MessageBoxIcon(S)如何获得、图像、MessageBoxIcon、MessageBoxImage