Sometimes we run into the problem of testing private methods that are not visible from a Nunit assembly. One way that could be accomplished, without breaking the data encapsulation is to make the method in questions internal and add the following two lines to your code:
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("PutYourTestAssemblyNameHere")]
now it will work
Tuesday, August 14, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment