Closed egil closed 6 months ago
Seeing that the issue never really popped up for a user, I am much in favor of just closing the issue.
I don't see the obligation of highlighting this in our docs, as this is very bound to the test runner (xUnit, NUnit, MSTest, ...).
Often times a simple Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
is good enough (and is independent of the runner).
Should bUnit default to always generate markup using a specific culture? When e.g. a decimal is converted to a string, whatever the
Thread.CurrentThread.CurrentCulture
andThread.CurrentThread.CurrentUICulture
will affect how the number is represented (e.g. thousand separators, decimal separator).I think the answer is NO, bUnit should not dictate a culture by default, since I believe the Blazor runtime doesn't either when it generates markup in the browser. However, we could provide a convenient way for users to specify a culture. This is especially useful if a dev team is split across different cultures, where tests may pass in one culture but not in another.
At the very least, we should probably add an article in the docs that tell users how to control the culture. E.g. for xUnit, the typical solution is to include the UseCultureAttribute and that to tests, e.g.: