How to verify static methods with PowerMock - Tutorial

preview_player
Показать описание
Learn how you can verify that a static method has been called with Powermock!
This video will look at why Mockito is unable to verify static method calls. We will then
review the powermock dependencies required, and write a method that verifies if a static method is called
and the number of times it is invoked.

Link to source code:

Please like, subscribe and leave a comment to let me know what you think!

Рекомендации по теме
Комментарии
Автор

Just completed this course, it took me a week to complete But I'm a far better developer right now than I was a week before. Thanks much mate.

ShubhamSharma-sfwk
Автор

this channel is gold mine, Thankyou brother

altamashsabri
Автор

Thank you a lot. I have resolved my problem <3

vietogiaquoc
Автор

Thanks!

But what if I want to test a static method without a library/framework "from scratch"?

I mean in the case of a stub the test is easy...I will just make an interface and make a concrete class and a stub class that both implement that interface and everything is okay. But in case of a mock, what should I do?

mohamedyouns
welcome to shbcf.ru