ahmaddarawshi / powermock

Automatically exported from code.google.com/p/powermock
0 stars 0 forks source link

Investigate if we should byte-code manipulate an entire hierarchy #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Let's say we have a class called A which extends B. Suppose B has a
protected method called "myMethod" and we wish to create a partial mock of
A where only this method is mocked. Now we need to do both
@PrepareForTest({A.class, B.class}) which is non intuitive, perhaps we
should implicitly load B with the MockClassloader when doing
@PrepareForTest(A.class)?

Original issue reported on code.google.com by johan.ha...@gmail.com on 29 Oct 2008 at 11:34

GoogleCodeExporter commented 9 years ago
This is now done automatically using the @PrepareForTest annotation. Users can
override this behavior by falling back to using @PrepareOnlyThisForTest.

Original comment by johan.ha...@gmail.com on 3 Nov 2008 at 1:14

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 3 Nov 2008 at 1:14