For example;
results.Errors.Count.Should().Be(0, $"because {results.Errors[0]}");
produces the Result Message:
Expected value to be 0 because 'Name' should not be empty., but found 2.
But what I really want, in this particular instance (invocation of the assertion) is just the value of results.Errors[0]
, that is I would like the message to be just: 'Name' should not be empty.
(As an aside what I really want is to pass a concatenated string representation of the entire results.Errors
array, but my linq/lambda skills aren't there yet)!
So how can I get FA to just use what I supply as the message string?