oghenez / mycila

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

Support powermock #35

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be handy with powermock-mockito support in mycila for mocking static 
methods.
Now I just mycila-spring and mycila-mockito, but powermock-mockito needs to 
have it's own PowerMock runner in order to be able to override the static 
method.

Original issue reported on code.google.com by davidkar...@gmail.com on 30 Sep 2011 at 7:22

GoogleCodeExporter commented 8 years ago

Original comment by mathieu....@gmail.com on 9 Oct 2011 at 9:45

GoogleCodeExporter commented 8 years ago
Hi,

Did you tried using:

    @Rule
    public PowerMockRule rule = new PowerMockRule();

as suggested here:

http://code.google.com/p/powermock/wiki/PowerMockRule

Original comment by mathieu....@gmail.com on 9 Oct 2011 at 10:12

GoogleCodeExporter commented 8 years ago
I've checked the source code of PowerMock and MycilaTesting (it's been a long 
time since I didn't played with). I fear it would be complicated to make both 
of them working. Both Spring and PowerMock are using advanced Junit runner 
features and PowerMock plays a lot with classloaders and custom/enhanced test 
instances.

So let this issue opened because it would be interesting to have it but 
requires some work: just the integration of Spring testing tool with PowerMock 
testing tool outside of Mycila Testing can be challenging.

Original comment by mathieu....@gmail.com on 10 Oct 2011 at 2:30

GoogleCodeExporter commented 8 years ago

Original comment by mathieu....@gmail.com on 10 Oct 2011 at 2:31