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

Super-class constructor mocking: MockGateWay newInstanceCall type behavior expected #454

Closed
johanhaleby opened this issue Jul 25, 2015 · 2 comments

Comments

@johanhaleby
Copy link
Collaborator

From bahatan...@gmail.com on March 12, 2013 12:36:16

What steps will reproduce the problem? 1. Keeping PowerMock.expectNew for super class constructor do not work while testing inheriting class's constructor. I understand that expectnew is not a way to intercept call to Super.
2.MockGateWay constructorCall gets executed which only looks for Suppressions but not for newSubstitutions of MockRepository
3.PowerMock is a dream-tool, so getting the superclass-constructor intercepted is not possible?

Using latest powermock version for easymock.

Original issue: http://code.google.com/p/powermock/issues/detail?id=434

@johanhaleby
Copy link
Collaborator Author

From bahatan...@gmail.com on March 12, 2013 05:01:52

Hi
To rephrase the question: how to just expect a super class constructor call to TEST
"Our inheriting class did try to call the super class constructor" while we are also say suppressing the super-class constructor.
Here the Test Motive is only to test there was a effort to call the same.

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on March 26, 2013 12:45:34

Hi, please use the mailing list to ask questions.

Status: Invalid

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

1 participant