Skip to content
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

How to set the return value from a method which returns object? #33

Open
SaajanJoshi opened this issue Nov 27, 2019 · 1 comment
Open

Comments

@SaajanJoshi
Copy link

Is it possible to get object which is return from a method with object return type. I believe SetMethodReturnValue cannot be used for such cases. Could you provide some example for mocking a method with a object return type, if it is available in existing code?

@msabbott
Copy link
Owner

Hey @SaajanJoshi,

Thanks for the report. I have had a quick look at the code, and I can't see a way to do it at present. The code assumes that the return values are all primitive data-types and can be converted from a string.

I'll flag this as a bug, and something that needs to be enhanced.

Right now, my day job prevents me from working too much on the library, but if you feel like you want to give it a go, then I'd welcome any pull request :-)

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

No branches or pull requests

2 participants