Friday, January 11, 2008

Unit Test On Internal Methods DotNet C#

Place this inside the assembly info of the project that you want to test:
//Taken from the Ent. Lib. 2.0 Solution.
[assembly: InternalsVisibleTo("Microsoft.Practices.EnterpriseLibrary.Data.Tests")]

The argument, in this case "Microsoft.Practices.EnterpriseLibrary.Data.Tests", should be the name of the project containing the tests.

1 comment:

Anonymous said...

Awesome! I was just wandering how to test my internal methods!