17 Unit testing EF Core applications

This chapter covers

  • Simulating a database for unit testing
  • Using the database type as your production app for unit testing
  • Using an SQLite in-memory database for unit testing
  • Solving the problem of one database access breaking another part of your test
  • 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 for working with EF Core 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. Personally, I think unit testing is useful, and I use it a lot. It makes ...

Get Entity Framework Core in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.