-
-
Notifications
You must be signed in to change notification settings - Fork 802
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
Set Times expectation on Setup #373
Comments
+1 |
Being able to specify
I'm not against this feature, but I'm digging up this bit of history so we won't end up swinging back and forth between two opposing design decisions. @kzu: What is your position on the ability to specify |
While I completely agree with the AAA comment, the reason I submitted #401 is to cover scenarios like my I did play around with having a Example:
I realise that this is slightly an edge-case issue. |
@IanYates83 - that makes sense, I've come across one other issue where someone had the same problem with reference type state changing and not being verifiable after the fact. I'm generally in favour of your proposed changes. Like I already commented on your PR:
|
@stakx Responding to your comments here but will action your request on the other PR.
|
@IanYates83, I've been pondering this proposed feature today, and I'm no longer sure that it's the best solution even for your edge case scenario. There are several reasons:
In conclusion, Moq already has all the features needed to deal with that argument-capture edge case, and introducing the proposed feature (admittedly a handy one) leads to a somewhat more ambiguous / semantically unintuitive API (IMHO). I think to deal with the edge case, we'd do better to introduce a new overload Any thoughts on this? |
Would be nice if I can set times expectation on Setup instead of separated Verify. e.g.:
The text was updated successfully, but these errors were encountered: