-
-
Notifications
You must be signed in to change notification settings - Fork 798
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
Any reason there is no Mock.Of<>() overload with MockBehavior? #154
Comments
Related question: Does mock.VerifyAll(); do anything if not strict? If not it should throw if called when not strict. |
VerifyAll is unaffected by MockBehavior. It verifies that all setups have It could be that in a loose mock you do want to verify certain setups. And As to the previous question: the Linq provider ends up calling Do you want to take a shot at a PR to fix that? That would be very helpful! Thanks in advance /kzu Daniel Cazzulino | Team Lead | Xamarin for Visual Studio On Thu, Feb 12, 2015 at 3:01 PM, Johan Larsson notifications@github.com
|
Hopefully I can give it a try this weekend. Will update here if I give up or can't find time for it. |
Keep us posted! Thanks again for volunteering to look into this :) /kzu from mobileOn Feb 12, 2015 7:18 PM, "Johan Larsson" notifications@github.com wrote:
|
https://gitter.im/oxyplot/oxyplot |
@JohanLarsson: Just a friendly ping. It's been a while since this thread was active. Did you ever get around to look into this? Do you still think this should be followed up at all? |
I wrote a PR with it but there was a whitespace mess so it was never merged. Then I forgot about it many times. Here is the diff, agreed it is messy. |
OK, thanks for letting me know. This will probably be difficult to merge due to the diff's relative age. Nevertheless, I should eventually get around to taking a closer look at it. Once I do, I'll report back here. |
I should clean it up. Adding The overload |
This looks as if the NuGet package restore didn't kick in. You should be able to open either of the two solutions you mentioned. I am working on Moq in VS 2017, works fine. |
Got it to build now, looks like having more than one package source confused nuget.exe. |
I closed the PR accompanying this issue a while ago, but overlooked the issue and left it open.
After looking into Moq's performance issues some more I've actually found one reason against this proposed additional overload: compared to Given that the only time when you'd use the new Thus adding this new overload at a time when the performance of The only real advantage here would be that I suggest people who want that overload write their own utility method that returns a strict mocked object; adding this to Moq's main library at this time would be counterproductive. |
I think ^ could be useful but don't know if there is a reason it is not there. Hence this question.
The text was updated successfully, but these errors were encountered: