Hi
I found out that our documentation is not complete in this issue. :(
Thanks for pointing the problem, We will fix it.
Here are the steps you should take to make it work:
Note that the order is significant.
Sign your test assembly
Build the test assembly.
Extract the public key of the test assembly like this:
sn.ex -Tp MySignedTestAssembly.dll
This will write the public key to the command line output.
Add this lines to the assembly you want to test:
[assembly: InternalsVisibleTo("DynamicMockAssembly=0024..")] //DynamicMockAssembly key
[assembly: InternalsVisibleTo("MySignedTestAssembly, PublicKey=1234..")] //Your test assembly key
The PublicKey of MySignedTestAssembly should be the extracted key from sn.exe output.
Build again.
After all these steps you should be able to mock internal abstract classes
and interfaces without creating the concrete implementation.