-
Notifications
You must be signed in to change notification settings - Fork 222
Refactoring: improve code #1277
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
Conversation
1. check that street name contains cyrillic letters (in specific countries) 2. use random seed instead of hard-coded "1".
first of all, `FakerContext.toString()` contained unneeded leading comma: "FakerContext{, locale=tr, randomService=RandomService@23423}"
PR Summary
|
| private static final Faker NL_FAKER = new Faker(new Locale("nl", "NL")); | ||
| private static final Faker RU_FAKER = new Faker(new Locale("ru", "RU")); | ||
| private static final Faker AU_FAKER = new Faker(new Locale("en", "AU")); | ||
| private static final Pattern CYRILLIC_LETTERS = Pattern.compile(".*[а-яА-Я].*"); |
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.
IIRC this doesn't cover ёЁ, may be some other cyrillic letters
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.
That's right, these are SOME cyrillic letters, not ALL cyrillic letters.
I think it's good enough for this specific test.
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.
I don't disagree but incase there's a need in the future you can use the character class \p{IsCyrillic}
No description provided.