I like to keep my production code and my unit testing code in separate assemblies. A downside of this is has been that all classes must be public but I have now found that C# does support 'friend' assemblies via an
AssemblyInfo.cs attribute:
[assembly: InternalsVisibleTo("UnitTests")]
I have not used this attribute yet, but I like the idea of making classes as internal. It makes the intent (usage scope) self evident. I wonder if it will help detect orphaned code?
3 comments:
Works great, Thank you!
Rob,
This was a lifesvaer. Great find!
Perfect.
Post a Comment