-
-
Notifications
You must be signed in to change notification settings - Fork 794
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
Support indexer with multiple arguments #694
Support indexer with multiple arguments #694
Conversation
Hi @idigra, and thanks for this PR, too. Same as with the earlier one from today, I'll try to find some time for reviewing this soon.
Which null reference exception are we talking about here? Could you post an issue with repro code (or refer me to an existing closed issue)?
It shouldn't be necessary to introduce a The problem with |
I added a test in the PR that reproduces the bug, named CallbackWithMultipleArgumentIndexerSetterWithoutAny. Now there's an issue #695 :)
Why not? I think it's a useful scenario. |
I don't know the exact reason, either. I am guessing that this decision was made simply because being able to write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for your PR! 👍
I'd appreciate if we could focus only on your PR's first stated goal, i.e. fixing the NullReferenceException
when setting up an indexer with more than one index parameter. This is the reason why I'm asking you (below) to remove everything related to SetupSetMethod
.
I'm happy to discuss SetupSetMethod
/ the deprecated SetupSet
overload / improvements of the current implementation of SetupSetImpl
in a separate issue, if you'd like.
Also, please add an entry for your bug fix to CHANGELOG.md
:
# Moq Changelog
All notable changes to this project will be documented in this file.
The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
+## Unreleased
+
+#### Fixed
+
+* Short description of your bugfix (@idigra, #694)
+
+
## 4.10.0 (2018-09-08)
…ption in multiple argument indexer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being quiet so long. All good to go now. I'll update the changelog for you.
@idigra, Moq 4.10.1, which includes your bugfix, has just been published on NuGet. |
Thanks. I finally came to verify it, but then I understand that without extending the API to support Any matcher in indexer argument I can't really reach a scenario in which the bug was reproduced. |
Sorry, it's been a while, and there's not much context here. Which bug exactly are you referring to? |
This PR contains support in multiple arguments.