Skip to content
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

Verification exception message produces incomplete call expression for delegate mocks #678

Closed
stakx opened this issue Sep 4, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@stakx
Copy link
Contributor

stakx commented Sep 4, 2018

With Moq v4.9.0, the following code:

var mock = new Mock<Action>();
mock.Setup(m => m());
mock.Verify(m => m(), Times.Once());

will throw the following exception:

Moq.MockException:
Expected invocation on the mock once, but was 0 times: m =>
…

The call expression m => is incomplete. It should be m => m().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant