You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EventHandlerCollection likewise uses event names as its keys. Using EventInfo would be more correct, but care would have to be taken to properly deal with polymorphism.
The text was updated successfully, but these errors were encountered:
Code to reproduce:
Expected outcome:
The above test should pass, since
IA.E
andIB.E
implemented byAB
are two distinct events.Actual outcome:
The test fails because Moq treats both events as one and the same.
Additional details:
This is a direct consequence of Moq identifying events by name only, see e.g.:
https://github.com/moq/moq4/blob/0307f25564e75d68f0fc189f4d8c8c800b59f98e/src/Moq/Interception/InterceptionAspects.cs#L209-L263
EventHandlerCollection
likewise uses event names as its keys. UsingEventInfo
would be more correct, but care would have to be taken to properly deal with polymorphism.The text was updated successfully, but these errors were encountered: