Skip to content

Enhance Commerce Provider testing with Ukrainian locale support#1708

Merged
kingthorin merged 3 commits intodatafaker-net:mainfrom
vicky-iv:commerce-tests
Oct 27, 2025
Merged

Enhance Commerce Provider testing with Ukrainian locale support#1708
kingthorin merged 3 commits intodatafaker-net:mainfrom
vicky-iv:commerce-tests

Conversation

@vicky-iv
Copy link
Copy Markdown
Contributor

  • Added CommerceLocaleTest.java to provide testing for Ukrainian commerce data
  • Added individual validation for product name parts:
    • Adjective component (commerce.product_name.adjective)
    • Material component (commerce.product_name.material)
    • Product component (commerce.product_name.product)

@what-the-diff
Copy link
Copy Markdown

what-the-diff bot commented Oct 27, 2025

PR Summary

  • Introduction of a new test file
    A new file named CommerceLocaleTest.java has been added. This file is designed to conduct tests that are specific to the Commerce locale. It is a dedicated setup to check the functionality within the scope of commerce-related tasks.

  • Incorporation of localization testing
    The newly introduced CommerceLocaleTest.java facilitates localization testing. It includes setting up various product name attributes for testing, which aids in ensuring that the commerce functionalities of different locales work correctly and as intended.

  • Update to an existing test file
    The CommerceTest.java has been updated with a new array called commerceProductName. This array is used to store product names in a broken-down format. This enhancement makes the testing of product name attributes more precise and thorough.

  • More comprehensive test cases
    We've broadened the coverage of our test cases. Additional specifications have now been included in the providerListTest. This expanded testing now checks and validates adjectives, materials, and product names using the array commerceProductName which ensures deeper and broader coverage of different scenarios.

@asolntsev asolntsev added this to the 2.5.4 milestone Oct 27, 2025
@asolntsev asolntsev added enhancement New feature or request refactoring labels Oct 27, 2025
@kingthorin kingthorin merged commit 0014fc5 into datafaker-net:main Oct 27, 2025
13 checks passed
@vicky-iv vicky-iv deleted the commerce-tests branch October 27, 2025 23:39
@kingthorin
Copy link
Copy Markdown
Collaborator

Splitting on space has lead to failures:
https://github.com/datafaker-net/datafaker/actions/runs/18859794216/job/53815604879

@vicky-iv vicky-iv restored the commerce-tests branch October 28, 2025 00:29
@vicky-iv
Copy link
Copy Markdown
Contributor Author

I see - this is because of

product_name:
    adjective:
        - "Heavy Duty"

It's the only parameter with a space in the middle. There could be more cases like this in the future, so the proposed approach definitely isn't going to work.
I could at least remove these changes from CommerceTest - what do you think?

@kingthorin
Copy link
Copy Markdown
Collaborator

Ya unless you can think of another alternative

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants