Open tonyhallett opened 3 years ago
@tonyhallett, would you be OK with...
value
parameter being ignored in SetupSet
and VerifySet
) in #1184 instead, andThen we can more precisely associate PRs with existing issues, and have them auto-closed separately via a "fixes #..." comments.
@stakx No problem.
The draft pull request has the missing indexer support
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.
MoqProtected can be improved. MoqProtectedAs does not suffer these issues. I think that despite there being an alternative this should be addressed.
SetUpSet ignores the value parameter and uses ItExpr.IsAny()
This is contrary to the xml docs.
VerifySet also ignores the value parameter. This behaviour is best shown with Moq's own tests
https://github.com/moq/moq4/blob/a6fde8b6d79a7437bf642d115785b97f40779b6a/tests/Moq.Tests/ProtectedMockFixture.cs#L806
and https://github.com/moq/moq4/blob/a6fde8b6d79a7437bf642d115785b97f40779b6a/tests/Moq.Tests/ProtectedMockFixture.cs#L834
Indexers are not properly supported.
These are not so important https://github.com/moq/moq4/blob/a6fde8b6d79a7437bf642d115785b97f40779b6a/src/Moq/Protected/ProtectedMock.cs#L92 https://github.com/moq/moq4/blob/a6fde8b6d79a7437bf642d115785b97f40779b6a/src/Moq/Protected/ProtectedMock.cs#L186 https://github.com/moq/moq4/blob/a6fde8b6d79a7437bf642d115785b97f40779b6a/src/Moq/Protected/ProtectedMock.cs#L267
This ( and SetupSet ) should be supported.
It already does.
https://github.com/moq/moq4/blob/a6fde8b6d79a7437bf642d115785b97f40779b6a/src/Moq/Protected/ProtectedMock.cs#L293
SetupGet and VerifyGet should also allow for indexers.