This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Testing and the fly likes Supress call from super keyword with powermockito Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Supress call from super keyword with powermockito" Watch "Supress call from super keyword with powermockito" New topic
Author

Supress call from super keyword with powermockito

dileep keely
Ranch Hand

Joined: Jun 28, 2010
Posts: 91
I am able to supress a superclass method "superMethod()" in my case when called from ChildClass as " super.superMethod()" using powermockito.
But the problem is arrised in ascenario when the Childclass has a method name similar to the invocation target name.


As told earlier I won't be able to suppress the call made in the below scenario (underlined) as the method name is same as the invocation method name "super.superMethod()" hence I get
the assertion error.




Can some one help me to know if there is some way ?

Hans Beemsterboer
Greenhorn

Joined: Jul 25, 2012
Posts: 1
Hi,

This issue has been reported for PowerMock:
Powermock issue 51
Powermock issue 364

For issue 51, I've uploaded a patch that fixes the suppression of the superclass method for overridden methods.

Greetings,
Hans
 
Consider Paul's rocket mass heater.
 
subject: Supress call from super keyword with powermockito