-
Notifications
You must be signed in to change notification settings - Fork 731
Closed
Labels
Description
Description
The output for failed string.Should().Be() shows the incorrect actual value when the value contains JSON strings ending with }}}}.
Complete minimal example reproducing the issue
string expect = "{\"a\":{\"b\":1}}";
string actual = "{\"a\":{\"b\":1}}}}";
actual.Should().Be(expect);Expected behavior:
FluentAssertions.Execution.AssertionFailedException: Expected actual to be
"{"a":{"b":1}}" with a length of 13, but
"{"a":{"b":1}}}}" has a length of 15, differs near "}}" (index 13).
Actual behavior:
FluentAssertions.Execution.AssertionFailedException: Expected actual to be
"{"a":{"b":1}}" with a length of 13, but
"{"a":{"b":1}}" has a length of 15, differs near "}}" (index 13).
Versions
Fluent Assertions 5.10.0 Targetting .Net Core 2.0/2.1/2.2/3.0/3.1
Fluent Assertions 5.10.0 Targetting .Net Framework 4.7.2 (not tried others)