Skip to content

Use generic approach for test data generation#1

Closed
snuyanzin wants to merge 1 commit intovicky-iv:color-testsfrom
snuyanzin:prop
Closed

Use generic approach for test data generation#1
snuyanzin wants to merge 1 commit intovicky-iv:color-testsfrom
snuyanzin:prop

Conversation

@snuyanzin
Copy link
Copy Markdown

No description provided.

arguments(TestSpec.of(colorBY::name, "color.name"), fakerBY),
arguments(TestSpec.of(colorDK::name, "color.name"), fakerDK));
return FAKERS_MAP.values().stream()
.map(baseFaker -> TestSpec.of(() -> baseFaker.color().name(), "colr.name"))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.map(baseFaker -> TestSpec.of(() -> baseFaker.color().name(), "colr.name"))
.map(baseFaker -> TestSpec.of(() -> baseFaker.color().name(), "color.name"))

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, thanks

FYI: I put this as an idea, I didn't have green tests after that since no time ...
however I think it is the way to go
if it is still actual I can take a closer look on weekend probably

@vicky-iv vicky-iv closed this Nov 5, 2025
@vicky-iv
Copy link
Copy Markdown
Owner

vicky-iv commented Nov 5, 2025

@snuyanzin Thank you for the PR, it's a great idea!
However, removing BaseFaker fakerUA would require refactoring several other test classes that are not included in this PR, so for now I've closed it.
I used your idea as a base and improved ColorLocaleTest in a new commit: datafaker-net@fd6f819

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants