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 does include configured setups for delegate mocks #677

Closed
stakx opened this issue Sep 4, 2018 · 0 comments · Fixed by #679
Closed

Verification exception message does include configured setups for delegate mocks #677

stakx opened this issue Sep 4, 2018 · 0 comments · Fixed by #679
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 =>
No setups configured.
No invocations performed.
   at …

The statement No setups configured. is obviously incorrect, since there is a matching setup.

@stakx stakx added the bug label Sep 4, 2018
@stakx stakx added this to the 4.10.0 milestone Sep 4, 2018
@stakx stakx self-assigned this Sep 4, 2018
@stakx stakx closed this as completed in #679 Sep 4, 2018
@devlooped devlooped locked and limited conversation to collaborators Sep 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant