In my unit tests, I want to be able to validate the content message of the exception but since our build servers farm has clients in french and english, the message changes between runs and ends up crashing the tests.
The actual way I do it is that I test if it is one or the other but it is uselessly complicated and ugly. I’m using MsTest v2 and FluentAssertions. I already tried setting
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-CA");
but it looks like it is not the right place to fix the culture for exceptions globalization. What is?