Maybe I dreamed this whole thing, but I could swear that the last time I used FluentAssertions, if I did something like this:
myobject.myMember.Should().Be("Hello");
If the assertion failed, I would get a really useful message like "Expected myMember to be "Hello"
But today, I'm just getting "Expected string to be "Hello".
Did I just imagine that, or is FluentAssertions supposed to include the member name in its error messages?
Sorry, wrong framework. Althought it is something I'm considering for #463
Bummer. Would be a really awesome feature -- would eliminate a lot of the "because" clauses
This is fixed with #588 which will be a part of the upcoming 5.0.0.
The failure message will now be:
Expected myobject.MyMember to be "Hello" with a length of 5, but "Hello!" has a length of 6.
Note that for this to work, your test needs to:
Most helpful comment
Bummer. Would be a really awesome feature -- would eliminate a lot of the "because" clauses