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

Match params arrays in setup/verification expressions using structural equality #948

Merged
merged 4 commits into from
Oct 18, 2019

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Oct 18, 2019

... which is how Moq treats these arrays in other parts, but currently not in recursive setup/verification expressions.

Fixes #946.

Other parts of Moq match `params` arrays not by reference equality but
by structural equality (i.e. by comparing their elements). This does
not appear to work in recursive expressions.
@stakx stakx added this to the 4.13.1 milestone Oct 18, 2019
Copy link
Contributor Author

@stakx stakx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things to clean up & think about.

src/Moq/InvocationShape.cs Show resolved Hide resolved
src/Moq/InvocationShape.cs Show resolved Hide resolved
src/Moq/InvocationShape.cs Show resolved Hide resolved
tests/Moq.Tests/InvocationShapeFixture.cs Outdated Show resolved Hide resolved
@stakx stakx force-pushed the param-arrays-in-recursive-expressions branch from 7262a8f to 0502d33 Compare October 18, 2019 20:03
@stakx stakx merged commit 7415f68 into devlooped:master Oct 18, 2019
@stakx stakx deleted the param-arrays-in-recursive-expressions branch October 18, 2019 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recursive mocks with different paths
1 participant