1. Overview In this tutorial, we're going to look at different ways to create mock objects using Mockito. Mockito provides specific annotations to ...
Continue Reading1. Overview In this tutorial, we're going to look at defining multiple expectations on a mock. Generally, we configure a method on the mock object ...
Continue Reading1. Overview Mockito allows us to define expectations on mock objects. Additionally, we generally must reconfigure mock objects on different test me...
Continue Reading1. Overview In this tutorial, we'll explore different ways to return custom values from mocked methods. For this purpose, Mockito provides the Answ...
Continue Reading1. Overview In this tutorial, we'll look at how we can return an argument that is passed to the mocked method. For this purpose, we'll use Mockito'...
Continue Reading1. Overview In this tutorial, we'll investigate how to capture method arguments on the mocked methods using Mockito. For this purpose, we'll use th...
Continue Reading1. Overview In this tutorial, we'll investigate how we can monitor unit tests using JUnit test rules. JUnit provides the TestWatcher class as a tem...
Continue Reading1. Overview In this tutorial, we'll examine how we can create a custom JUnit test rule to introduce new behavior to our tests. In the end, we'll ha...
Continue Reading1. Overview In this tutorial, we'll look at different ways to verify exceptions in a JUnit test. 2. Verifying Exceptions using @Test Annotation Fir...
Continue Reading1. Overview In this tutorial, we'll look at the built-in JUnit test rules. In the end, we'll have the knowledge to use them at appropriate places. ...
Continue Reading