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

Created Issue: "".Should().StartWith should not throw System.ArgumentOutOfRangeException [12293]

$
0
0
When the asserting if a string starts with a specific string, but the first string is shorter in lenght, an ArgumentOutOfRange exception is throw.

Example:
"ABCDEFG".Should().StartWith("ABCDEFGHIJKLMN");

Result:
System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.

Expected:
AssertFailedException with message.

Viewing all articles
Browse latest Browse all 1402

Trending Articles



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