Testing with EF Core 2
When creating an application that uses EF Core you’ll quickly wonder how you can test your code. In this course you’ll learn about strategies that can help with testing your code by using in-memory database providers like InMemory and SQLite.
What you'll learn
In this course, Testing with EF Core, you will learn how EF Core can help with testing code that relies on calls into your database. First, you will learn about different ways of testing your application. Next, you will discover how in-memory database providers like InMemory and SQLite can help with improving your tests. Finally, you will explore how to isolate your tests and how to enhance Test Explorer with logs coming from EF Core. When you're finished with this course, you will have the skills and knowledge of EF Core needed to improve your tests and thus the reliability of your code.
Table of contents
- Coming Up 1m
- Learning What the EF Core InMemory Database Provider Is 2m
- Demo - Getting Ready for Testing with the InMemory Database Provider 5m
- Unit Testing with the Arrange, Act, Assert Pattern 3m
- Demo - Writing Your First Unit Test Using the Inmemory Database Provider 7m
- Demo - Writing Additional Unit Tests 5m
- Isolating Tests 1m
- Demo - Isolating Tests 2m
- Improving Tests by Using Multiple DbContext Instances 2m
- Demo - Using Multiple DbContext Instances 2m
- Mocking Limitations of the InMemory Database Provider 1m
- Demo - Testing with Referential Integrity 1m
- Advantages and Disadvantages of the InMemory Database Provider 2m
- Summary 2m