• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Supress call from super keyword with powermockito

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic