在被测试的代码库的AssemblyInfo.cs中添加“[assembly: InternalsVisibleTo("UnitTest项目名称")]”。
C#测试--内部类测试
原文:http://www.cnblogs.com/mmry/p/7117255.html