Description
Course info
Rating
(67)
Level
Intermediate
Updated
Aug 2, 2019
Duration
1h 23m
Description

Writing unit tests is difficult if the dependencies between your application classes make it difficult to draw a boundary between what you want to test and the rest of the codebase. In this course, Getting Started with Mockito, you will gain the ability to focus on the thing you’re trying to test without having to worry about the rest of the codebase. First, you will learn how to use mock objects instead of real dependencies. Next, you will discover how to configure mocked methods, including return values and exception throwing. Finally, you will explore the concept of partial mocks and how to use them to test tricky situations. When you are finished with this course, you will have the skills and knowledge of mocking with Mockito needed to test your Java applications by creating, configuring, and using mocks in your unit tests.

About the author
About the author

Nicolae has been a Software Engineer since 2013, focusing on Java and web stacks. Nicolae holds a degree in Computer Science and enjoys teaching, traveling and motorsports.

More from the author
Getting Started with EasyMock
Intermediate
1h 52m
Jan 22, 2020
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone, my name is Nicolae Caprarescu, and welcome to my course, Getting Started with Mockito. I'm a freelance software developer with experience in both the corporate and the startup worlds. Automated tests are the key to creating high-quality software. In this course, you'll learn how to easily isolate the thing you're trying to test from the rest of the code base. You do so by using Mockito, the leading Java mocking framework. Some of the major topics that we will cover include test doubles and mocking at an abstract level; creating, configuring, and verifying mocks; using partial mocks; and resolving situations where testing is difficult, such as testing code that deals with time or code that you can't change. By the end of this course, you'll have the Mockito skills needed to easily test your Java applications. Before beginning this course, you should be familiar with writing object-oriented Java code and with testing with JUnit 5. I hope you'll join me on this journey to learn how to easily write great unit tests with the Getting Started with Mockito course, at Pluralsight.