Quantcast
Channel: Fluent Assertions
Viewing all articles
Browse latest Browse all 1402

Commented Issue: Improve exception message for string.Should.Be(multiple lines) [10938]

$
0
0
The current exception when strings are not equal is:

Expected "bc", but "a" is too short.

This works well when the excepted and actual value are not multiple lines; ie do not have System.Environment.NewLine characters. When the values are multiple lines then the exception message is:

Expected "the qick brown
fox", but "the quick brown
fox" is too long.

In these situation I propose the exception message is changed to:

Expected

"the qick brown
fox"

but

"the quick brown
fox"

is too long.

I purpose the white space in the exception message to make it visually easier to compare the two values.
Comments: Associated with changeset 67315.

Viewing all articles
Browse latest Browse all 1402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>