Debojyoti-Chanda opened a new pull request, #1597: URL: https://github.com/apache/commons-lang/pull/1597
## Description This PR enhances the unit test coverage for the `Range` class by adding two high-value test scenarios: 1. **Reversed Arguments:** Verifies that `Range.of(max, min)` correctly self-corrects to identify the proper lower and upper bounds for both `Integer` and `String` types. 2. **Case-Insensitive Ordering:** Ensures that the `Range` correctly respects the `String.CASE_INSENSITIVE_ORDER` comparator, confirming that containment logic functions as expected regardless of character casing. ## Motivation The `Range` utility is designed to be robust and "self-healing" regarding input order. These tests ensure this behavior remains intact during future refactors. Furthermore, explicitly testing custom comparators ensures that the class does not inadvertently fall back to natural ordering. ## AI Disclosure I used **Gemini** mainly to assist with documentation, specifically in drafting the PR description and ensuring the JUnit 5 test cases were formatted according to standard practices. All logic and test assertions were manually verified and adjusted to meet the project's technical requirements. ## Verification - **Command:** `mvn` (default goal) - **Status:** `BUILD SUCCESS` - **Test Execution:** `RangeTest` passed successfully. - **Environment:** macOS (AArch64), Java 25. - **Style:** Verified locally with `mvn checkstyle:check`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
