Skip to content

Conversation

@m-koops
Copy link
Contributor

@m-koops m-koops commented Oct 21, 2025

Fixes #530.

This MR will capture the value class arguments by it content/unboxed type in the Java Mockito captor.
In case of value class arguments the captured values are then translated back as boxed value class instances in the methods firstValue(), secondValue(), thirdValue(), lastValue(), singleValue() and allValues() of the Kotlin captor.

The enhancements are covered with additional unit tests.

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@TimvdLippe TimvdLippe merged commit d8fe7c7 into mockito:main Oct 22, 2025
4 checks passed
@m-koops m-koops deleted the arg-capture-value-class branch October 26, 2025 14:15
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.

Argument capture for value classes

2 participants