Should allow null references as constructor parameters.
The overloads of new Mock<T>() that take params object[] args to pass on to the constructor of the class ought to allow null arguments (e.g. object?[] args).
null is definitely allowed, see e.g. here:
https://github.com/moq/moq/blob/06d88ec526b2d879fa3520e4daed3abcd451953e/src/Moq/Mock%601.cs#L305-L308
What is missing, however, are nullable reference type annotations in all of Moq's public API. It would be nice to add those sometime.
P.S.: regarding these annotations, I've opened a separate issue for them; see #1418.
Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.
Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.
This issue will now be closed since it has been labeled 'stale' without activity for 30 days.
