This chapter covers
- Simulating a database for unit testing
- Using an in-memory database for unit testing
- Using real databases for unit testing
- Unit testing a disconnected state update
- Capturing logging information while unit testing
This chapter is about unit testing applications that use EF Core for database access. You’ll learn what unit-testing approaches are available and how to choose the correct tools for your specific needs. I also describe numerous methods and techniques to make your unit testing both comprehensive and efficient.
Unit testing is a big subject, with whole books dedicated to the topic. I focus on the narrow, but important, area of unit-testing applications that use EF Core for ...