Summary
With this chapter, we've closed the development cycle of the application we've been building. We started small by writing a few simple classes with our business logic, wrote the web server to it, and finished by integrating it with persistence. We finished this section by learning how to test the features we wrote, and that's what we did in this chapter. We decided on going with a few different types of tests, instead of extensively going module by module writing all the tests, as we believe that's where more value is added.
We started with a very simple unit test for the business logic, then moved on to an integration test with multiple classes, and later wrote a test for the web server. These tests can only be written by leveraging the architecture we've created, following dependency injection principles, and trying to keep the code as decoupled as possible.
As the chapter proceeded, we moved on to integration tests, which closely mimic the...