Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Powermock framework creates mock objects?

I want to know the technique used behind the creation of mock objects by Powermock? I also want to now how the technique used in mock creation help us verify the behavior of the mock? If anybody can explain with an example it would be more helpful.

like image 475
Malathi Avatar asked Oct 22 '25 23:10

Malathi


1 Answers

See http://www.jayway.com/2009/05/17/mocking-static-methods-in-java-system-classes/ for details. Here it is described how Powermock works under the hood.

like image 126
Gábor Lipták Avatar answered Oct 24 '25 13:10

Gábor Lipták



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!