Partha-SUST16 opened a new pull request, #620: URL: https://github.com/apache/commons-collections/pull/620
Hi, I’ve added unit tests for certain behaviors in the `CircularFifoQueue` and `MultiKeyMap` classes that are described in the Javadoc but were not explicitly tested before. These tests do not increase code coverage, as the relevant lines are already executed by other tests, but they help make the intended behavior more explicit and well-documented through testing. For `CircularFifoQueue`: - `add` always returns true, even if an element is discarded. - `isEmpty` returns a boolean indicating whether the queue is empty. For `MultiKeyMap`: -`put` throws a `ClassCastException` if the key is not a MultiKey. - `multiKeyMap` throws a `NullPointerException` when the provided map is null. - `removeAll` returns a boolean to indicate if any entries were removed. I added separate test methods for each of these behaviors in their respective test classes. Even though they don’t increase coverage metrics, I believe these tests are useful for improving clarity, helping future maintainers understand the method contracts better, and guarding against subtle regressions. Thanks! -- 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]
