-
-
Notifications
You must be signed in to change notification settings - Fork 798
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
CallBase
should not be allowed for delegate mocks
#706
Comments
Hey, created PR #708 |
@tehmantra, thank you for picking this one up! 👍 I've posted a review on your PR. (P.S.: On a totally unrelated note, please say hello to Auckland and the whole Hauraki Gulf for me. Wish I were there.) |
It looks like something is wrong with this issue. I have this code
Where
But I do not call |
There was a breaking change in Moq 4.10.1 (see devlooped/moq#706) and now `CallBase` flag is no longer supported for the delegates. The unit tests do not reflect that somehow, as currently we don't have a way to run tests again multiple minor versions of the same dependency.
@Veikedo Notice, it has been fixed in AutoFixture. Please update to a new version (it will be published soon) to get a fix 😉 |
Reproduction code:
Actual behavior:
mock.Object.Invoke()
throws aNotImplementedException
with message:Expected behavior:
The call to
.CallBase()
should throw aNotSupportedException
with a message explaining thatCallBase
cannot be used with delegate mocks.The same should happen when setting a delegate mock's
CallBase
property totrue
.The text was updated successfully, but these errors were encountered: