-
-
Notifications
You must be signed in to change notification settings - Fork 804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mock.Of<T> fails with exception 'Unhandled Exception: System.ArgumentException: Interface not found' #340
Comments
Perhaps https://github.com/moq/moq4/blob/c8c5db1775c6b6a9e682e34f14bf7b79782b70de/Source/Extensions.cs#L178 should check if a type implements |
My current understanding of (binary) serialization in .NET is that it follows these rules:
I haven't yet investigated what Moq did or did not do in previous versions, but based on the above, I believe it should do the following:
Does that sound right? |
@stakx based on the remarks in https://msdn.microsoft.com/en-us/library/system.runtime.serialization.iserializable.aspx, your summary seems correct:
More interestingly, as part of a recent PR, they identify |
Moq version: 4.7.8
Error:
Repro1
Repro2
The text was updated successfully, but these errors were encountered: