Skip to content

Conversation

@kingthorin
Copy link
Collaborator

@kingthorin kingthorin commented Jun 28, 2024

If an expression has arguments it shouldn't be treated as "simple".

Tweak FaverValueService logic and add test to FakerValueServiceTest.

Fixes #1274

If an expression has arguments it shouldn't be treated as "simple".

Tweak FaverValueService logic and add test to FakerValueServiceTest.

Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
@what-the-diff
Copy link

what-the-diff bot commented Jun 28, 2024

PR Summary

  • Enhancement of Directive Evaluation in FakeValuesService
    In FakeValuesService.java, we've introduced a safety measure, in the form of a condition check. Now before any directive is added to the list of results, the system makes sure that it is "simple", improving the overall quality of data processed.

  • Additional Import in FakeValuesServiceTest
    In our test file FakeValuesServiceTest.java, we've added an import for LuhnCheckDigit. This is a utility which allows us to perform certain checks, therefore enhancing our testing capabilities.

  • New Test Method: expressionWithSingleEnumArg
    In order to increase the robustness of our tests, a new test method named expressionWithSingleEnumArg() has been added to FakeValuesServiceTest.java. This aims to scrutinize an expression with a single enum argument, helping reinforce our testing parameters.

@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.98%. Comparing base (b37c566) to head (d51e19c).
Report is 173 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1275      +/-   ##
============================================
- Coverage     92.35%   91.98%   -0.37%     
- Complexity     2821     3092     +271     
============================================
  Files           292      310      +18     
  Lines          5609     6053     +444     
  Branches        599      637      +38     
============================================
+ Hits           5180     5568     +388     
- Misses          275      323      +48     
- Partials        154      162       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@panilya
Copy link
Collaborator

panilya commented Jun 28, 2024

@kingthorin Thank you for fixing it!

@kingthorin
Copy link
Collaborator Author

No problem. I'm just trying to give the other devs a chance to see it incase I've overlooked something. If there's nothing else in the next few days I'll go ahead and merge it.

@asolntsev
Copy link
Collaborator

asolntsev commented Jun 28, 2024

@kingthorin I've tried your fix: works for me.

@kingthorin
Copy link
Collaborator Author

Great, thanks!

@kingthorin kingthorin merged commit 6aa592b into datafaker-net:main Jun 28, 2024
@kingthorin kingthorin deleted the test branch June 28, 2024 23:29
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.

java.lang.ClassCastException for finance.credit_card provider with Enum argument in Faker expression

4 participants