Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 移除内部可视对象以进行生产_C#_.net_Vb.net_Unit Testing_Testing - Fatal编程技术网

C# 移除内部可视对象以进行生产

C# 移除内部可视对象以进行生产,c#,.net,vb.net,unit-testing,testing,C#,.net,Vb.net,Unit Testing,Testing,是否可以为生产和验收测试禁用InternalsVisibleTo 虽然我希望能够在设计时插入内部构件,但我并不希望这些构件在更高级别的测试中暴露出来。您可以在 很好的建议,我没想到。为什么你的内部结构在验收测试中都是可见的?@dcastro它们不是,这就是重点。我想在那个时候把它移除。 #if(DEBUG) [assembly:InternalsVisibleTo("SomeAssembly")] #endif

是否可以为生产和验收测试禁用
InternalsVisibleTo


虽然我希望能够在设计时插入内部构件,但我并不希望这些构件在更高级别的测试中暴露出来。

您可以在


很好的建议,我没想到。为什么你的内部结构在验收测试中都是可见的?@dcastro它们不是,这就是重点。我想在那个时候把它移除。
#if(DEBUG)
[assembly:InternalsVisibleTo("SomeAssembly")]
#endif