Skip to content

Swapped method arguments will overwrite previous method setup #50

payn-git opened this Issue Jun 20, 2013 · 2 comments

3 participants


What steps will reproduce the problem?
When method with two arguments of same type is setup another setup call with swapped arguments will lead to situation where previous setup is removed.

What is the expected output? What do you see instead?
In case when arguments are swapped Mock should still hold reference to two different versions of method invocation setup. First which will get instance A as first argument and B as second argument. Second which have B as first argument and A as second argument.

Please reffer to attached simple code example which will simulate issue very easily.

What version of the product are you using? On what operating system?

Please provide any additional information below.
Please see attached code example which will lead to incorrect behaviour.


This is now solved, see issue #252 and pull request #262.
The issue can be closed.

Moq Team member
kzu commented May 22, 2016

Indeed. Thanks @LeonidLevin!

@kzu kzu closed this May 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.