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

Can not instantiate proxy of class #924

Closed
robertok77 opened this issue Sep 6, 2019 · 2 comments
Closed

Can not instantiate proxy of class #924

robertok77 opened this issue Sep 6, 2019 · 2 comments

Comments

@robertok77
Copy link

Hi,
I 've created object of a class with parameterless constructor.
On the other hand when I tried to mock this class, I got exception 'Can not instantiate proxy of class. Could not find a parameterless constructor'.
See attached file.

MockParameterlessConstructor

regards
Robert

@stakx
Copy link
Contributor

stakx commented Sep 7, 2019

Not much that can be gleaned from one screenshot.

(Could it be that you've declared that parameterless constructor internal without making internals visible to DynamicProxy as explained in the quickstart?)

Please post some short, minimal, executable code that reproduces this problem.

@robertok77
Copy link
Author

I edited my code after I reminded about DynamicProxy is underneath and no more posts are necessary

@stakx stakx removed the needs-repro label Sep 9, 2019
@devlooped devlooped locked and limited conversation to collaborators Sep 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants