Chapter Summary
In this chapter we’ll introduce you to Unit Testing, what it is, and why you’d use it. We’ll then create unit tests to test the core functionality of our API Controller, providing us with an automated regression suite (don’t worry if you don’t know what that means!).
When Done, You Will
Understand what Unit Testing is and why you should use it.
Understand the power of the Repository Interface once again!
Understand how to use a mocking or isolation framework in unit testing.
Write Unit Tests using xUnit to test our API functionality.