antonmihaylov / OpenXmlTemplates

Word .docx templating system that is designer (no scripting tags) and server-friendly (no word installation required)
GNU Lesser General Public License v3.0
89 stars 25 forks source link

Ensure Consistent Numeric Formatting in Unit Tests Across Different Locales #49

Closed SergeyFM closed 4 months ago

SergeyFM commented 4 months ago

Overview This pull request introduces a modification to the Format_Numeric_Fields unit test to set the CultureInfo.CurrentCulture to CultureInfo.InvariantCulture. This change ensures that the numeric formatting remains consistent, regardless of the regional settings of the system on which the tests are executed.

Background Unit tests often fail across different environments due to variations in culture settings, especially when it comes to numeric, date, and time formats. Such inconsistencies can lead to failed tests on some systems while passing on others, which is highly undesirable for maintaining stable and reliable build processes.

Request for Review I request a review from the team to ensure that this approach aligns with our overall testing strategy and to confirm the robustness of the test modifications.