0

For example, I have the first "Good day brother" and the second "Good day sister" line, where in FluentAssertions, when calling the Should().Be() method, I will get the following error:

Expected string to be "Good day sister" with a length of 15, but "Good day brother" has a length of 16, differs near "bro" (index 9).

Where I have the context of the difference in the form of only 3 letters, but I want to increase this value, thank you very much in advance!

I tried to find various extensions but did not find any configurations or settings to increase this value

  • Not sure what you mean. `Should.Be()` checks the strings are identical. If you only want to check the first two words, then just check those..? – stuartd Mar 29 '23 at 10:27
  • Don't get it. Do you want a different assertion or is the assertion correct and you just want the error response of the assertion in a different way? – Ralf Mar 29 '23 at 10:48
  • @Rafl I need to have more context where exactly the discrepancy in terms occurs, I just have two json files whose size exceeds 100,000 characters, and very often there are places where they repeat themselves, so in order not to search for a long time, I want to have more context on which characters the difference went through Ctrl + F – GuardianDead Apr 07 '23 at 09:41

0 Answers0