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
...I get a different exception (ArgumentException).
Expression is not an event attach or detach, or the event is declared in a
class but not marked virtual
So, is the conclusion basically that we cannot mock these events, since they aren't virtual? That's what the exception message is telling me, but I just want to check... Are there any other realistic test scenarios for 3rd party classes which uses events?
The text was updated successfully, but these errors were encountered:
Hi,
Trying to unit test some WPF-related code and in that situation, I'm trying to get the code below to work:
However, this gives me an
ArgumentNullException
with the following message:Skipping the EventArgs.Empty makes no difference.
If I change my example to something like this:
...I get a different exception (
ArgumentException
).So, is the conclusion basically that we cannot mock these events, since they aren't virtual? That's what the exception message is telling me, but I just want to check... Are there any other realistic test scenarios for 3rd party classes which uses events?
The text was updated successfully, but these errors were encountered: