4 simple ways to stub a void method with Mockito

preview_player
Показать описание
This video will look ath the different ways that we can control our system under test when using void methods with Mockito.
This video explores how we would want to handle void methods when using a mock or a spy, and how the answer functional interface also
presents unique ways to provide custom logic to a void method, and when it would be most appropriate.
#Mockito #SoftwareTesting

🕒 Timestamps 🕒

00:00 - Overview
00:40 - Class under test
01:50 - doNothing
03:12 - doCallRealMethod
05:08 - doThrow
07:16 - doAnswer

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

Thanks for the video. How to mock private methods with return type void?

bibinmathewvarghese
Автор

You voice was so distracting through out the video 😄
….it was easy to understand video thank you

meandmydays