-
Notifications
You must be signed in to change notification settings - Fork 178
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
swedish ssn cannot have format like XXXXXX-000X #1434
Conversation
…to be between 001 and 999
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1434 +/- ##
============================================
+ Coverage 92.18% 92.25% +0.06%
- Complexity 3161 3165 +4
============================================
Files 320 320
Lines 6178 6181 +3
Branches 592 593 +1
============================================
+ Hits 5695 5702 +7
+ Misses 340 338 -2
+ Partials 143 141 -2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TrueJacobG There is a way to generate non-"000" number without a loop:
private String generateEndPart(BaseProviders f) {
return "%03d".formatted(f.number().numberBetween(1, 1000));
}
Thanks @asolntsev , @kingthorin and of course @TrueJacobG for working on this together, nice improvement! |
swedish ssn cannot have format like XXXXXX-000X, the end number part has to be between 001 and 999
explanation: https://www4.skatteverket.se/rattsligvagledning/edition/2024.5/330242.html#update_20240802105842
Information obtained with help of @Jakub-Pazio and @Johannestegner