test: improve coverage for core.util classes - #348
Conversation
Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #348 +/- ##
============================================
- Coverage 79.74% 79.66% -0.08%
+ Complexity 4058 4042 -16
============================================
Files 517 513 -4
Lines 17347 17288 -59
Branches 1339 1339
============================================
- Hits 13833 13773 -60
- Misses 2946 2947 +1
Partials 568 568 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This PR improves test coverage for the
org.moreunit.core.utilpackage by adding unit tests for utility classes that were previously lacking coverage.Changes Included:
LRUCacheTestto verify correct LRU eviction behavior (when entries exceedmaxSize, the eldest is removed and MRU status is properly tracked).StringLengthComparatorTestto verify that strings are compared properly based on their length, covering scenarios with shorter vs longer, longer vs shorter, and equal length strings.ObjectsTestto assert behavior of utility methodsequal()andhash(), including safe null handling, equal values, and hashcode generation for multiple objects.FeaturesTestto ensure feature toggle configurations based on system properties resolve correctly (true, false, default).Validation:
LRUCache,StringLengthComparator,Objects,Features.Objects.equal(null, null)), eldest eviction order when fetching cached elements, and default system property evaluation.xvfb-run -a mvn -f org.moreunit.build/pom.xml testbuild successfully locally with all tests passing and no regressions introduced. No mocking was required since all logic involves pure unit logic.PR created automatically by Jules for task 12283811644484274572 started by @RoiSoleil