vijayjcp / powermock

Automatically exported from code.google.com/p/powermock
Apache License 2.0
0 stars 2 forks source link

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

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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 reported on code.google.com by bahatan...@gmail.com on 12 Mar 2013 at 11:36

GoogleCodeExporter commented 8 years ago
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.

Original comment by bahatan...@gmail.com on 12 Mar 2013 at 12:01

GoogleCodeExporter commented 8 years ago
Hi, please use the mailing list to ask questions.

Original comment by johan.ha...@gmail.com on 26 Mar 2013 at 7:45