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

Invocation count incorrect. Argument object is stored as reference and is changed incorrectly #1309

Closed
rufusz opened this issue Dec 9, 2022 · 2 comments

Comments

@rufusz
Copy link

rufusz commented Dec 9, 2022

Invocation.Arguments object is stored as reference and will be changed for all invocations incorrectly.

See here: https://stackoverflow.com/questions/74743085/moq-invocation-arguments-changing-in-subsequent-calls

@stakx
Copy link
Contributor

stakx commented Dec 10, 2022

is stored as reference

... because its type is a reference type, so that is to be expected.

@stakx
Copy link
Contributor

stakx commented Dec 31, 2022

If anyone finds this issue and is experiencing the same problem, please see #1319; the last code example in the PR description shows a way how to solve this.

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

No branches or pull requests

2 participants