Skip to content
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

Confusing failure message in Should().BeAssignableTo(...) #1103

Closed
Tyrrrz opened this issue Jul 27, 2019 · 2 comments

Comments

@Tyrrrz
Copy link

commented Jul 27, 2019

Description

When Should().BeAssignableTo(...) fails, it leaves a confusing message.

Complete minimal example reproducing the issue

((object) null).Should().BeAssignableTo(typeof(string));

Expected behavior:

Expected an object assignable to System.String, but found <null> instead.

Actual behavior:

Expected type not to be System.String, but found <null>.

Versions

  • Which version of Fluent Assertions are you using?

5.7.0

  • Which .NET runtime and version are you targeting? E.g. .NET framework 4.6.1 or .NET Core 2.0.

.NET 4.6

Additional Information

image

@Tyrrrz

This comment has been minimized.

Copy link
Author

commented Jul 27, 2019

Thank you ❤️

@jnyrup

This comment has been minimized.

Copy link
Collaborator

commented Aug 10, 2019

Just a heads up: 5.8.0 has been released with the fix for this.

And thanks for reporting this, it's appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.