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
Icon created by FreePik from www.flaticon.com