Skip to content
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

make IBAN random generation independent per IBAN #126

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

aSemy
Copy link
Contributor

@aSemy aSemy commented Jan 8, 2024

This PR makes IBAN random generation independent per IBAN.

This should prevent problems in the future where an IBAN Structure is modified.

Adjusting the behaviour like this is just one option to fix it, the other would be to update the tests (although I'm not sure how that can be done...).

Summary

  • create new instances of Randoms where necessary, so that adding/removing IBAN entries won't affect any IBANs that are subsequently generated.
  • update tests to use assertAll, so it's easier to check & update each value

Verification

I had a quick play around to verify it by adjusting the structure of GL and verifying only one of the ibanBuilderConstructionSeeded() tests failed. I'd appreciate it if you could take a more thorough look :)

Fix #91

- create new instances of Randoms where necessary, so that adding/removing IBAN entries won't affect any IBANs that are subsequently generated.
- update tests to use assertAll, so it's easier to check & update each value
@hajk1 hajk1 merged commit 91866cb into arturmkrtchyan:master Jan 10, 2024
1 check passed
@aSemy aSemy deleted the fix/independent-iban-random branch January 10, 2024 18:40
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.

Allow setting a seed for Random
2 participants