Add tests for ThrowableFunction and FileExtensionFilter to approach 100% coverage#257
Merged
mercyblitz merged 6 commits intodevfrom Mar 19, 2026
Merged
Conversation
…nsionFilter Co-authored-by: mercyblitz <533114+mercyblitz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Java test cases for ThrowableFunction and FileExtensionFilter
Add tests for ThrowableFunction and FileExtensionFilter to approach 100% coverage
Mar 19, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
…dFileWatchService, and ArtifactDetector Co-authored-by: mercyblitz <533114+mercyblitz@users.noreply.github.com>
…ue, StringToIterableConverter, and AbstractURLClassPathHandle Co-authored-by: mercyblitz <533114+mercyblitz@users.noreply.github.com>
…ionUtils Co-authored-by: mercyblitz <533114+mercyblitz@users.noreply.github.com>
Co-authored-by: mercyblitz <533114+mercyblitz@users.noreply.github.com>
|
Copilot stopped work on behalf of
mercyblitz due to an error
March 19, 2026 07:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request adds a comprehensive set of new unit tests across several core modules, focusing on improving coverage for collections, conversion, file I/O, and JSON handling. The new tests verify immutability, edge cases, error handling, and correct fallback behaviors, as well as introduce a new test class for the
StringToIterableConverter. These changes help ensure the robustness and reliability of the library's core utilities.Collections:
ofList,ofSet, andofMapmethods inListsTest,SetsTest, andMapsTest, ensuring that attempts to modify returned collections throwUnsupportedOperationException. [1] [2] [3]AbstractDequeTest, includingremoveFirstOccurrence, offer/poll sequences, and push/pop operations.Conversion:
StringToIterableConverterTestthat covers acceptance, conversion, fallback, and priority logic forStringToIterableConverterandStringToCollectionConverter.AbstractConverterTestwith tests forhashCode,resolvePriority, and additional equality scenarios.File I/O and Filtering:
StandardFileWatchServiceto cover starting, stopping, closing, and handling multiple listeners.FileExtensionFilterTestwith cases for dot-prefixed extensions and filename filter acceptance.JSON Handling:
JSONArrayTestandJSONObjectTestfor invalid double values, fallback behaviors foroptBoolean,optDouble,optInt,optLong, andoptString, as well as write operations and exception handling. [1] [2]Classloading:
AbstractURLClassPathHandleTestwith a test for setting and restoring priority.