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

Use LocalDateTime in birthday tests #1100

Merged
merged 2 commits into from
Feb 29, 2024
Merged

Conversation

snuyanzin
Copy link
Collaborator

No description provided.

Copy link

what-the-diff bot commented Feb 29, 2024

PR Summary

  • Simplification of import statements
    The file DateAndTimeTest.java had some unnecessary imports for java.util.Calendar and java.util.GregorianCalendar which have now been removed.

  • Updating method for calculating date
    The method of calculating 'from' and 'to' variables in the testBirthday() method has been modernized. It now uses LocalDateTime and ZoneId instead of the older Calendar and GregorianCalendar.

  • Stabilizing the date variable
    The date variable has been reassigned as final, improving the robustness of the code by preventing unwanted modifications.

  • Assert statement improvements
    The assertion check, which helps in verifying the correctness of the code, has been updated. It now uses assertThat method in place of assertEquals, offering a more fluent interface and flexible testing capabilities.

  • Refining the 'assert' condition
    In the assertThat condition, we now validate if the birthday timestamp is less than to instead of comparing it for equality. This change allows for a more flexible date and time comparison.

  • Updated comments
    To provide clarifications and enhance readability, the comments detailing changes in the code have been updated.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.33%. Comparing base (b37c566) to head (1f2a3ed).
Report is 15 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1100      +/-   ##
============================================
- Coverage     92.35%   92.33%   -0.02%     
- Complexity     2821     2822       +1     
============================================
  Files           292      292              
  Lines          5609     5610       +1     
  Branches        599      598       -1     
============================================
  Hits           5180     5180              
  Misses          275      275              
- Partials        154      155       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@snuyanzin snuyanzin merged commit 77fae1f into datafaker-net:main Feb 29, 2024
7 checks passed
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.

2 participants