Step-by-step guide on how to use Mockito Answer - JUnit Mockito Tutorial

preview_player
Показать описание
Learn how you can achieve dynamic method stubbing with the Answer functional interface and the benefits it can enable over hard-coding stubbed methods. This video will explore the challenges of hard-coded method responses with stubbing and how an Answer implementation can reduce boilerplate code from a test class.
#Mockito #SoftwareTesting #JUnit

🕒 Timestamps 🕒
00:00 - Introduction
00:31 - Class under test
01:50 - Basic test class
03:05 - The problem faced
04:15 - Answer functional interface
05:08 - Answer implementation to get
06:40 - Answer implementation to update
Рекомендации по теме
Комментарии
Автор

Hello there Aneesh Mistry. Do you have courses? Or do you want to get an apprentice?

Sendilien
Автор

Just a thought: When you switch between classes (BookManager, BooksRepository), why don't you try to Split Right one of the classes? It would be more convenient for us to follow the tutorial. Not sure how would it look like on smaller screens, though.

marko