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
Closed

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

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

Comments

@Tyrrrz
Copy link

@Tyrrrz Tyrrrz 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
Copy link
Author

@Tyrrrz Tyrrrz commented Jul 27, 2019

Thank you ❤️

Loading

@jnyrup
Copy link
Member

@jnyrup jnyrup 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!

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants