FINERACT-2494: Add unit tests for ApiParameterHelper in fineract-core.#5677
FINERACT-2494: Add unit tests for ApiParameterHelper in fineract-core.#5677San-43 wants to merge 2 commits intoapache:developfrom
Conversation
|
Hi @San-43 , I see you're working on this issue! I’ve already submitted PR #5665 addressing FINERACT-2494. My approach focuses on building a comprehensive unit test suite for ApiParameterHelper, including coverage for edge cases such as null handling, negative offsets, malformed inputs, and boundary conditions. The tests are designed as isolated JUnit 5 unit tests to ensure reliability and maintainability within fineract-core, and I’m also aligning with static analysis improvements from FINERACT-2510. Happy to align approaches or incorporate any feedback from the community. |
|
Hi @Ambika-Sony, thanks for the note and for your work on this. I actually hadn’t noticed #5665 when I started #5677. I saw a couple of closed PR targeting FINERACT-2494, but I missed #5665, apologies for that. After comparing #5665 and #5677, my view is that #5677 is a bit cleaner for FINERACT-2494 because it keeps the change strictly tests-only, in line with the ticket scope. In #5665, there are also I’m happy to align and avoid duplication. If maintainers prefer a single path, I can either:
Happy to follow maintainer guidance either way. |
Description
This PR fixes FINERACT-2494.
New test coverage for API parameter extraction and parsing:
ApiParameterHelperTestwith tests for extracting and validatingcommandId, fields, associations, and locale from query parameters, including handling of missing, blank, invalid, and duplicate values.parameterType,template,makerCheckerable,includeJson, andgenericResultSet, verifying correct handling of true, false, and missing values.genericResultSetflag.Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.