Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests are language dependent #1003

lg2de opened this Issue Mar 2, 2019 · 2 comments


None yet
2 participants
Copy link

lg2de commented Mar 2, 2019

I wondered why some tests fail while your build seams to complete successfully.

I found, that some tests are language dependend, e.g. When_asserting_collections_not_to_be_equal_but_expected_collection_is_null_it_should_throw:

    "Cannot compare collection with <null>.*Parameter name: unexpected");

The test verifies the text from exception, but the ArgumentNullException generates text depending on user/windows settings. On my (german) system the text is "Parametername" instead of "Parameter name".

I see three options:

  1. remove (always) language dependend part of verified message ("Cannot compare collection with .*: unexpected")
  2. run all tests explicitely with english locale (either in build.ps1 or [better] within the test)
  3. introduce and use UseCultureAttribute from xUnit samples

What do you think?
For me, option 3 would be the best.


This comment has been minimized.

Copy link

dennisdoomen commented Mar 3, 2019

I would go for option 2. I would always code in English. In the Netherlands, it's quite common to work with non-Dutch developers.

Regardless, this issue is not related to Fluent Assertions.


This comment has been minimized.

Copy link
Contributor Author

lg2de commented Mar 3, 2019

Hi @dennisdoomen, I think this is a misunderstandig: I was talking about the Unit Tests of FluentAssertions. So, it is related to FA.
I'm coding in English, but other things are fine in German. So, I would like to have configured my Windows to German. But THAN "your" Fluent Assertions Unit Tests will fail.

I think, this should be fixed. The tests should NOT be related to the language selected for the OS they are running on!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.