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 met an exception when trying to run the test that have the following code. When I try to make an expression that using a cast, this exception was throw by Moq: "System.ArgumentException : Unsupported expression: (IObserver)player". Why Moq don't allow to cast in this situation? Or I'm writing the test code in wrong way?
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.
Verify is used to match against invocations on the mock. Casting the object to another type does not involve any invocations on it (by default, unless you're trying to test an override of an implicit or explicit cast). Is that your scenario?
I met an exception when trying to run the test that have the following code. When I try to make an expression that using a cast, this exception was throw by Moq: "System.ArgumentException : Unsupported expression: (IObserver)player". Why Moq don't allow to cast in this situation? Or I'm writing the test code in wrong way?
The text was updated successfully, but these errors were encountered: