-
-
Notifications
You must be signed in to change notification settings - Fork 542
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
BeEquivalentTo shows enums as decimal in error message #897
Comments
Thanks for bringing this up. The default behavior for comparing If you want to compare the enums by name instead, you can use car.Should().BeEquivalentTo(new Car() { Color = Color.Blue },
opt => opt.ComparingEnumsByName()); which changes the failure message to
Getting back to your issue, I think the failure message can be improved for both Some ideas for the failure message:
Including more details is useful if one e.g. compares The relevant class is |
Didn't know about |
@dennisdoomen can we close this one? |
If @robvanuden agrees, then yes? |
Agree, thanks @krajek! |
Description
BeEquivalentTo shows enums as decimal in error message
Expected member Color to be 1M, but found 0M.
Complete minimal example reproducing the issue
Expected behavior:
Message: Expected member Color to be Blue, but found Red.
Actual behavior:
Message: Expected member Color to be 1M, but found 0M.
Versions
Additional Information
Running in Xunit, when relevant.
The text was updated successfully, but these errors were encountered: