Skip to content

Conversation

@asolntsev
Copy link
Collaborator

No description provided.

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}"
@asolntsev asolntsev self-assigned this Jun 29, 2024
@what-the-diff
Copy link

what-the-diff bot commented Jun 29, 2024

PR Summary

  • Enhanced Readability in SingletonLocale, FakeStream, FakeValues, FakeValuesContext and FakerContext Classes
    By adding formatted strings in the toString methods of the aforementioned classes, we have improved the readability of these components. This could lead to easier debugging and a better understanding of the underlying logic.

  • Improved Testing of Address Class
    We have enhanced the robustness of our AddressTest class by adding a StringMatcher condition and Pattern. Additionally, we've also added parameterized tests for Latin and Cyrillic street names, complete with assertions for Cyrillic street names. These additions will help ensure our Address class behaves correctly for a wider variety of street names, especially those from different languages and character sets.

  • Added UniqueTest Class Improvements
    The UniqueTest class has received some significant additions: a new formatted string in the toString method for readability, and a new static variable with corresponding assertions. These will ensure better test coverage and provide deeper insights into the behavior of the unique aspects of our system.

  • Static Variable Addition to ProvidersDocsGenerator
    A new static variable was added to the ProvidersDocsGenerator class, likely to maintain some globally required info or configuration. This could help the class perform its functions more effectively.

@asolntsev asolntsev added enhancement New feature or request java Pull requests that update Java code refactoring labels Jun 29, 2024
@asolntsev asolntsev merged commit 6ffe09f into main Jun 29, 2024
@asolntsev asolntsev deleted the refactor/improve-code branch June 29, 2024 08:38
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(".*[а-яА-Я].*");
Copy link
Collaborator

@snuyanzin snuyanzin Jun 29, 2024

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

Copy link
Collaborator Author

@asolntsev asolntsev Jun 29, 2024

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.

Copy link
Collaborator

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}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request java Pull requests that update Java code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants