C# allowing Unit Test project to access internal members of another project

Assuming that you have 2 projects in your solution
MySolution
+ MyProject
+ MyProjectTest
Add the following line to AssemblyInfo.cs in MyProject
[assembly: InternalsVisibleTo("MyProjectTest")]
This will allow you to access internal classes from MyProjectTest(unittests) project

Comments

Popular posts from this blog

Tibco Rendezvous (tibrv) C# .Net example

Parse XML to dynamic object in C#