In this lesson, we'll explain how to verify the parameters which are passed to mock objects.
We'll explain how Argument Captors work and how you can use them to ensure that not only is your mock method being called, but that it is being called with the correct parameter.
Summary of Content
- Showing an example where we need to not only verify that a mock method was called, but we also need interrogate the parameter passed to a mock method
- Explanation of what an Argument Captor is
- How to create an Argument Captor, using the
- How to retrieve the object that was captured by the argument captor, using the
- Showing a test passing which successfully verifies the parameter passed to a mock object.