Automation Rhapsody
Posts with tag: PowerMock
PowerMock examples and why better not to use them
In this post, I have summarised all PowerMock examples I've given so far. More important I will try to give some justification why I think necessity to use PowerMock is considered an indicator for a bad code design.
Jun 1, 2017
Mock new object creation with PowerMock
How to control what objects are being instantiated when using PowerMock.
May 30, 2017
Mock private method call with PowerMock
How to mock private method with PowerMock by using spy object.
May 29, 2017
Call private method with PowerMock
How to invoke a private method with PowerMock.
May 28, 2017
Verify static method was called with PowerMock
How to verify that static method was called during a unit test with PowerMock.
May 26, 2017
Mock static methods in JUnit with PowerMock example
Examples how to mock static methods in JUnit tests with PowerMock.
Oct 31, 2016
Mock JUnit tests with Mockito example
Why mocking is needed in unit testing and how to do it with Mockito.
Jun 14, 2016