This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Supress call from super keyword with powermockito

 
dileep keely
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic