C
C#16mo ago
Nemesis

❔ Moq VerifySet not working with indexed property

I am writing an Unit test to verify if the indexed property ([]) is being called for a class. For that I am doing:
Mock.Get(classObject).VerifySet(o => o[index] = value, Times.Once())
Mock.Get(classObject).VerifySet(o => o[index] = value, Times.Once())
But I get an error saying the expression is not a setter. VerifyGet and SetupSet work fine with index
2 Replies
Joreyk ( IXLLEGACYIXL )
as currently a fire is going on in moq and OSS , i think low amount of people are interested anymore in moq
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server