Skip to content

Conversation

@JMolenkamp
Copy link
Contributor

Allow for interception of any call to a generic method, regardless of used generic argument.
Related to issue 854

@dtchepak
Copy link
Member

Hi @JMolenkamp ,

Thanks a lot for this. Could you please add tests to this PR to demonstrate the change?

@JMolenkamp
Copy link
Contributor Author

JMolenkamp commented Jan 28, 2025

Added some tests. The first two fail without the change. The last one does not build without the change.

Maybe this PR needs to be split into two. Part of it is a fix for the first two tests, which should not fail, I think?
The other part is adding a MethodInfo property to CallInfo, allowing for something like the third test, which is similar to the use case that led me to make this PR.

@JMolenkamp
Copy link
Contributor Author

Moved the fixes from this PR to #862. This PR now only contains the feature request.
It is dependent upon #862 though, the test for demonstration purposes will fail without it.

Copy link
Member

@dtchepak dtchepak left a comment

Choose a reason for hiding this comment

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

Thanks for this!
Merged in dependent PR. I think needs a rebase now.

@dtchepak dtchepak self-requested a review March 23, 2025 05:18
@dtchepak dtchepak merged commit 05ed0a7 into nsubstitute:main Mar 23, 2025
8 of 9 checks passed
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