-
-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moq not verifying Expressions as expected #271
Comments
Looks like it's because of the DisplayClass. Unless there's a recommendation on how to get them to compare, we're going with storing the Expression as part of the Returns statement then compiling and invoking the predicate against things that should and shouldn't match and asserting it the result is true or false. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In reference to this question I asked on Stack Overflow, We're attempting to verify that a specific LINQ query was ran against a mock, but it fails no matter what we do. If I abridge the code being tested to the following:
And run the following test:
The
Assert.IsNotNull
passes but theActivitiesMock.Verify
doesn't with the following error:Are we setting up a test incorrectly, are we expecting Moq to handle something it can't, or is this a bug in Moq?
The text was updated successfully, but these errors were encountered: