Mastering C# Unit Testing
Unlock the secrets of C# unit testing in the real world.
Course introduction
Course outline
Is this course for you?
Software prerequisites
Source code and other resources
Setting up VS Code for unit testing
Introduction
Avoid testing implementation details
Use fakes wisely
Avoid multiple AAA sections
Avoid logic in tests
Reusing test fixtures
Working with time
Testing private methods
Knowledge check
Introduction
Choosing what to test
The ASP.NET Core API you will unit test
Refactoring overcomplicated code – Take 1
Refactoring overcomplicated code – Take 2
Refactoring overcomplicated code – Take 3
Knowledge check
Introduction
Testing entities
Testing application services
Testing error mapping logic
Testing data repositories
Testing controllers
Testing minimal APIs
Knowledge check
Introduction
What is code coverage?
Using code coverage in VS Code
Using code coverage in Visual Studio
What’s the ideal code coverage number?
Configuring what to include in code coverage
Increasing the coverage
Knowledge check
Introduction
Running tests in parallel
Using AutoFixture
Using live unit testing
Unit testing with ChatGPT
Knowledge check