Closed GoogleCodeExporter closed 8 years ago
Original comment by johan.ha...@gmail.com
on 29 Oct 2008 at 11:45
Original comment by johan.ha...@gmail.com
on 31 Oct 2008 at 8:02
Moved to future release
Original comment by johan.ha...@gmail.com
on 17 Nov 2008 at 12:30
Do you know in which future release?
Original comment by magnus.p...@gmail.com
on 8 May 2009 at 7:57
Unfortunately not. I've tried to solve this before but I was unable to do so.
But now
since it's a requested feature maybe we'll prioritize it a bit more.
Original comment by johan.ha...@gmail.com
on 8 May 2009 at 10:49
suppressMethod should also support this
Original comment by johan.ha...@gmail.com
on 11 May 2009 at 6:23
supress method doesnt support this in case the the superclass method is called
within
the subclass method that is overiding it. for instance super.xxx()
Original comment by rani....@gmail.com
on 11 Jun 2009 at 10:35
Yes we're aware of this as well
Original comment by johan.ha...@gmail.com
on 11 Jun 2009 at 10:39
So is there any way i can run the test case for a method that overides and
calls the
super class method in it?Is there anyway to get rid of the error when the
line..super.xxx() gets called within the method that is tested?
Original comment by rani....@gmail.com
on 12 Jun 2009 at 6:09
You can most definitively test a method that calls super, but unfortunately you
cannot mock/suppress/stub the call to super right now. What you can do however
is of
course to mock/stub everything in the super method. If you like the behavior to
be
reused you can implement it using a mock policy. I've made an example of this,
the
test is here:
http://code.google.com/p/powermock/source/browse/trunk/modules/module-test/power
mock/junit4-test/src/test/java/samples/junit4/mockpolicy/MockPolicyUsageExampleT
est.java
which tests:
http://code.google.com/p/powermock/source/browse/trunk/tests/utils/src/main/java
/samples/mockpolicy/SomeClassWithAMethod.java
In the future please use our mailing-list for these kinds of questions (join our
google group and then send an e-mail to powermock@googlegroups.com).
Good luck.
Original comment by johan.ha...@gmail.com
on 12 Jun 2009 at 6:47
Perhaps we could make use of invokeSuper in MethodProxy in CgLib
Original comment by johan.ha...@gmail.com
on 2 Sep 2009 at 4:55
Will be moved to a future relase
Original comment by johan.ha...@gmail.com
on 11 Sep 2009 at 6:24
Has this issue been addressed?
I am having a issue related to this where I am trying to mock a method call to
a parent class. Any information would be appreciated.
http://stackoverflow.com/questions/8882806/powermokito-issue-with-extended-metho
ds
Original comment by Mark.FDM...@gmail.com
on 16 Jan 2012 at 7:08
I don't think it's possible to do this in Java because of the way polymorphism
works.
Original comment by johan.ha...@gmail.com
on 16 Jan 2012 at 7:37
Thanks for your response Johan. Sort of puts me in a tight spot in the
situation I am in. SuppressAll doesn't work, would using a replace with
invocation work?
Original comment by Mark.FDM...@gmail.com
on 16 Jan 2012 at 7:41
[deleted comment]
[deleted comment]
I've made a fix for this issue regarding the suppressing of the super call of
the overridden method.
Original comment by hpb...@gmail.com
on 25 Jul 2012 at 9:37
Attachments:
Issue 364 has been merged into this issue.
Original comment by johan.ha...@gmail.com
on 25 Jul 2012 at 11:23
I've applied the patch to trunk. Please verify!
Original comment by johan.ha...@gmail.com
on 25 Jul 2012 at 11:25
The patch also introduces a new class: ClassLocator
Please add this class too (maybe change the package location).
Original comment by hpb...@gmail.com
on 25 Jul 2012 at 12:53
Sorry I forgot it. I've added it now.
Original comment by johan.ha...@gmail.com
on 25 Jul 2012 at 1:13
I've verified it. Thanks for integrating the patch.
Original comment by hpb...@gmail.com
on 25 Jul 2012 at 1:32
Thanks for your help! Would be good if someone else could verify it as well.
Original comment by johan.ha...@gmail.com
on 25 Jul 2012 at 1:41
Hi all - Trying to verify this as well. Has this been pushed to public maven
repos just yet btw?
Original comment by kkuh...@gmail.com
on 2 Aug 2012 at 7:18
No it's only available in the trunk. You have to build powermock from the
sources. Just do mvn clean install -Dmaven.javadoc.skip=true and you should be
fine.
Original comment by johan.ha...@gmail.com
on 2 Aug 2012 at 7:31
Issue 399 has been merged into this issue.
Original comment by johan.ha...@gmail.com
on 4 Aug 2012 at 5:53
Issue 400 has been merged into this issue.
Original comment by johan.ha...@gmail.com
on 4 Aug 2012 at 5:53
Is this patch available yet?
Original comment by corykend...@gmail.com
on 15 Nov 2012 at 4:03
No it's only available in the trunk. You have to build powermock from the
sources. Just do mvn clean install -Dmaven.javadoc.skip=true and you should be
fine.
Original comment by johan.ha...@gmail.com
on 15 Nov 2012 at 8:16
Original issue reported on code.google.com by
johan.ha...@gmail.com
on 29 Oct 2008 at 11:45