It is not necessary to expose all methods being tested as
In the project's AssemblyInfo.cs
public
when using an external test project. By using the assembly attribute InternalsVisibleTo
and specifying the namespace of the "friend" assembly, the visibility of the methods can then be reduced to internal
, hiding them from all other assemblies. In the project's AssemblyInfo.cs
[assembly: InternalsVisibleTo("MyAssembly.Tests")]
No comments:
Post a Comment