Skip to content

FINERACT-2534: Add unit tests for StreamUtil utility class#5624

Open
devi-pathak2263 wants to merge 1 commit intoapache:developfrom
devi-pathak2263:add-streamutil-tests
Open

FINERACT-2534: Add unit tests for StreamUtil utility class#5624
devi-pathak2263 wants to merge 1 commit intoapache:developfrom
devi-pathak2263:add-streamutil-tests

Conversation

@devi-pathak2263
Copy link

Description

This PR adds unit tests for the StreamUtil utility class in fineract-core.

The following methods are covered:

  • foldLeft collector functionality
  • mergeMapsOfLists collector functionality

These tests verify that:

  • foldLeft correctly reduces a stream using the provided accumulator.
  • mergeMapsOfLists correctly merges maps with list values by concatenating lists for identical keys.

This improves test coverage and ensures the correctness of commonly used utility collectors.

JIRA: https://issues.apache.org/jira/browse/FINERACT-2534

##Testing

Executed locally:
./gradlew spotlessApply
./gradlew :fineract-core

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

@adamsaghy
Copy link
Contributor

@devi-pathak2263 Please squash your commits.

@devi-pathak2263
Copy link
Author

@devi-pathak2263 Please squash your commits.

Thanks for the feedback. I have squashed the commits into a single commit.

@adamsaghy
Copy link
Contributor

@devi-pathak2263 Can you please:

  • Set the commit email address to match with your github account email address?
  • Set GPG signature for commit?

Add unit tests for:
- foldLeft collector functionality
- mergeMapsOfLists collector functionality

Include edge case tests for empty streams and duplicate map keys.

Improves reliability and test coverage for StreamUtil.
@devi-pathak2263
Copy link
Author

@devi-pathak2263 Can you please:

  • Set the commit email address to match with your github account email address?
  • Set GPG signature for commit?

I have now:

  • updated the commit author email to match my GitHub account
  • amended the commit with a GPG signature

The latest commit should now be verified. Let me know if anything else needs improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants