dcsimg
 

Submitted by: Srinath M S(srinath_ms@yahoo.com)

Thursday Jan 30th 2020 by Srinath M S

Language: .NET, Expertise: Advanced - Learn how to expose non-public methods to the test project.

To expose non-public methods to the test project, you need to mark the assembly with an attribute called InternalsVisibleTo in the asemblyinfo.cs file??

For example:

[assembly: InternalsVisibleTo("testProjectName")]

You need to mark the methods as Internal, and they will available for you to test in the test project.

Home
Mobile Site | Full Site