Skip to content
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

Adjust default(Times) to Times.AtLeastOnce() #820

Merged
merged 2 commits into from
Apr 27, 2019

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Apr 27, 2019

See commit messages and code comments for details.

Specify that `default(Times)` should be equivalent to `Times.AtLeast-
Once()`, which is the implicit assumption of most public API method
overloads that don't explicitly ask for a `Times` instance.

While the use of `default(Times)` isn't encouraged, this still needs
to be made to work as `Times` is a struct, for which sensible default
values are a must. (In previous versions of Moq, `default(Times)` will
cause `NullReferenceException`s sooner or later; not too great.)
@stakx stakx merged commit 64638ae into devlooped:master Apr 27, 2019
@stakx stakx deleted the times-default branch April 27, 2019 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant