Enable Rhino Mocks to mock internal types
Description: Unit tests often are required to mock types defined in other assemblies. If those types are marked as Internal then it will fail to mock them. Enter InternalsVisibleToAttribute …
Link: http://www.codekeep.net/snippets/0b3da5af-819b-4289-88d2-c70cb8d8c6e7.aspx
[assembly :InternalsVisibleTo("Rhino.Mocks")] // obviously the Rhino Mocks assembly
[assembly :InternalsVisibleTo("DynamicProxyGenAssembly2")] // Rhino Mocks uses Castle DynamicProxy for the heavy lifting
[assembly :InternalsVisibleTo("<unit test assembly name>")] // your unit test assembly






