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.
Example:
"ABCDEFG".Should().StartWith("ABCDEFGHIJKLMN");
Result:
System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Expected:
AssertFailedException with message.