Closed scottkuhl closed 3 years ago
Scott, thanks for the suggestion. We can easily add the unit testing benefit. However, at this point in the textbook, diving into the example of the dependent service seems like too big of an ask for the students. Similarly, even a more straightforward example would distract from the core flow of the chapter.
https://education.launchcode.org/csharp-web-development/chapters/interfaces-and-polymorphism/interfaces.html
8.2.3. Benefits of Using Interfaces
This section should mention another benefit in that it makes unit testing easier.
I am not all the way through the course yet, but at some point the students should create an interface for a dependent service like the database and learn how to unit test without actually calling into the database.