So, I have a bunch of inner classes that I'm trying to make fun of with RhinoMocks. I added the following line to assemblyinfo.cs:
[assembly:InternalsVisibleTo(RhinoMocks.StrongName)]
However, this one still does not allow me to mock inner classes; I get the following error message from NUnit:
MyTests.SomeTest: System.TypeLoadException: method 'SomeMethod' of type 'SomeType504cf40be6b444abfd417dccf5d6752' from assembly 'DynamicProxyGenAssembly2, Version = 0.0.0.0, Culture = neutral, PublicKeyToken = null' does not override this method.
Please note that I am using the "merged" version of RhinoMocks (and not the "assembly with Castle" boot option). I do not know how Castle was combined with RhinoMocks, but should not make my internal elements visible to RhinoMocks, similarly make it visible to Castle (which is part of Rhino.Mocks.dll)?
source share