Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove InternalsVisibleTo for production

Is it possible to disable InternalsVisibleTo for production & acceptance testing?

Whilst I would like to be able to poke internals at design time, I don't really want these exposed at higher level testing.

like image 613
BanksySan Avatar asked Mar 15 '14 17:03

BanksySan


1 Answers

You can add the attribute in a preprocessor directive:

#if(DEBUG)
[assembly:InternalsVisibleTo("SomeAssembly")]
#endif
like image 155
Ufuk Hacıoğulları Avatar answered Oct 06 '22 02:10

Ufuk Hacıoğulları