Загрузка страницы

Mocking Static Methods with Mockito using Java

Starting with version 3.4.0 Mockito now supports mocking static methods. This video demonstrates how to make use of this feature to mock the usage of Java's UUID and LocalDateTime classes.

In addition, you'll learn how to refactor the implementation to avoid mocking static methods.

The source code for this example is available on GitHub: https://github.com/rieckpil/blog-tutorials/tree/master/mockito-tips-and-tricks

More testing related content is available here: https://rieckpil.de/category/testing/

» Want to become an expert for testing Spring Boot applications? Join the Testing Spring Boot Applications Masterclass: https://rieckpil.de/testing-spring-boot-applications-masterclass/

» Join the 14 Days Free Email Course on Testing Java Applications to Accelerate Your Testing Success: https://rieckpil.de/getting-started-with-testing-java-applications-email-course/

Видео Mocking Static Methods with Mockito using Java канала rieckpil
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
9 октября 2020 г. 12:32:28
00:08:47
Яндекс.Метрика