-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mocking generic functions separately for different types #39
Comments
Hi, |
Hi Johan, thanks for the reply.
I will have a look at the lib code to see if I can implement something
(could be above my head though). But since you said it won't be an easy
solution, I wonder if it might be more practical to just create simple
wrappers, one for each generic signature that needs mocking. Then it would
just be those non-generic wrappers to mock (no issues there). Given this
solution, do you think the "multi spy generic mock" enhancement would still
be needed ?
Thanks
Rob
…On Wed, Sep 29, 2021, 10:40 PM Johan Herscheid, ***@***.***> wrote:
Hi,
Thank you for using the library ;-)
I haven't tried mocking 2 generic methods at the same time. I don't think
it wil work at this moment because internally the mock will implement one
spy on the get method. To support this feature somehow the mock should have
different spies. But I don't think that's an easy solution. There should be
a some kind of switch inside the spy method based on the type.
I really like the idea to support this, so I will leave this issue open
for now.
If you have idea's yourself feel free to try things oud and send PR.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJTWSMHPCNRZZPJU5FPFSHTUEPZ3HANCNFSM5FAV66HQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi Rob, |
Hi, thanks for sharing your library.
A question - can this library be used to mock separate "generic signatures" of a generic function ?
Using your example:
can I create separate mocks for
etc at the same time ?
The text was updated successfully, but these errors were encountered: