Refactoring: improve code - #1277
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.
IIRC this doesn't cover ёЁ, may be some other cyrillic letters
There was a problem hiding this comment.
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.
I don't disagree but incase there's a need in the future you can use the character class \p{IsCyrillic}
No description provided.