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

MockException reports wrong invocation list #1534

Open
goe5mu opened this issue Feb 24, 2025 · 0 comments
Open

MockException reports wrong invocation list #1534

goe5mu opened this issue Feb 24, 2025 · 0 comments
Labels

Comments

@goe5mu
Copy link

goe5mu commented Feb 24, 2025

if a test is considered failed because of invocation list does not contain an invocation then exception is thrown, but when constructing the exception the list can be already changed (by a parallel thread for instance):

var invocations = mock.MutableInvocations.ToArray();

This way exception text contains something like:
Invocation of method1 was excepted but it was never invoked.
What was invoked is:
method2
method1

Back this issue
Back this issue

@goe5mu goe5mu added the bug label Feb 24, 2025
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