I have some tests that check strings that are displayed to the user.
I don’t wish the test to fail to due to changes in the indentations or line breaks etc. So I am
You can use CompareOptions:
String.Compare(a, b, CultureInfo.CurrentCulture, CompareOptions.IgnoreSymbols);
Extract from MSDN:
Indicates that the string comparison must ignore symbols, such as white-space characters, punctuation, currency symbols, the percent sign, mathematical symbols, the ampersand, and so on.