Guided course · ASP.NET Core and Web APIs
Unit Testing in .NET: xUnit, Test Doubles and TDD
- Write fast, readable unit tests with xUnit v3 on .NET 10.
- Choose the right test double, and know when not to mock.
- Test async code, time and randomness without flaky tests.
- Read coverage and mutation scores honestly, and practise test-driven development.
Intermediate5 modules · 14 lessons · 2 h 49 min · 9 practice tests · 2 free
Module 1 · Unit Test Basics
3 lessons · 35 min- 01What Makes a Good Unit Test in .NET: The Answer Interviewers WantFree, 1 practice test13 min
- 02xUnit v3 Basics: Facts, Theories, Assertions and Running Tests on .NET 10Free, 1 practice test11 min
- 03xUnit vs NUnit vs MSTest: Lifecycle, Parallel Runs and the New Test Platform (included with Full Access), 1 practice test11 min
Module 2 · Test Doubles and Testable Design
4 lessons · 50 min- 04Test Doubles in C#: Dummy, Stub, Fake, Spy and Mock (included with Full Access), 1 practice test13 min
- 05Designing Testable C# Code: Seams, Dependency Injection and Legacy Code (included with Full Access), 1 practice test12 min
- 06Moq, NSubstitute and FakeItEasy: Mocking Libraries, Limits and Licences (included with Full Access)13 min
- 07When to Mock and When Not To: Test Behavior, Not Implementation (included with Full Access)12 min
Module 3 · Async, Time and Flaky Tests
3 lessons · 36 min- 08Testing Async Code in C#: Tasks, Exceptions and Cancellation (included with Full Access), 1 practice test12 min
- 09Testing Time and Randomness: TimeProvider, FakeTimeProvider and Seeds (included with Full Access), 1 practice test11 min
- 10Flaky Unit Tests: Shared State, Test Order, Parallel Runs and Culture (included with Full Access), 1 practice test13 min
Module 4 · Readable Tests and Honest Metrics
2 lessons · 24 minModule 5 · Test-Driven Development
2 lessons · 24 minTechInterviewNotes Editorial Team ·