-
-
Notifications
You must be signed in to change notification settings - Fork 813
Support Mock.Get(mock, exp) syntax #229
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
Comments
I'd like to understand the motivation for this a little better. Why would you choose not to just specify all setups initially using My understanding is that |
What I want to address is convenience here. For example if I have the following settings that work in most cases:
But I need to modify this Of course, I can just refactor the mock setting logic in the initialize function to separate the logic. |
I think #293 asks for the same thing. The question there by kzu about how updates should be combined with the original setup / mock definition is valid here, too. What is your opinion on this question? |
I still think your issue could be subsumed under the other one. In Moq, there's already a precedent showing how updating existing & adding more setups should work: So you see, just as it is with |
Currently, functional style is only supported in this form:
After that, if I want to add more Setup on mockSomeType, I have to use Setup method many times:
I think it would be more convenient if we can support:
The text was updated successfully, but these errors were encountered: