By matixo
via tech.mrozewski.pl
Published: Nov 17 2009 / 09:08
A simple example of using PowerMock and Mockito for mocking static Java methods.
By matixo
via tech.mrozewski.pl
Published: Nov 17 2009 / 09:08
Comments
Jim Bethancourt replied ago:
If I could vote 10 times I would do it in a heartbeat! PowerMock + Mockito is AMAZING!!!
Chandru replied ago:
I agree totally. PowerMock is absolutely amazing. It can even be used to mock static methods in system classes, as I had posted before here http://www.dzone.com/links/mocking_mathrandom_using_powermock.html.
Mateusz Mrozewski replied ago:
@chandru.in
Thanks for the link, it's a great post also. Very useful tip.
majson replied ago:
I'm just wondering about the reason for "vote down" by baszero. Is it against usage of static methods at all, described tools or the blog post itself?
,
Mateusz Mrozewski replied ago:
I'm also wondering about the same :) Baszero, can you provide some more information? If you have any tips for improving that post I'm happy to listen :)
Voters For This Link (17)
Voters Against This Link (1)