Writing code that works today is only half the job. You also need to know it still works after the next change, and you need a reliable way to get it from your machine to production. Automated tests and a CI/CD pipeline give you both, and teams expect them in almost every professional .NET project.
You'll start with unit testing using xUnit, then learn to isolate the code under test by mocking dependencies with Moq. Next comes integration testing a Web API with WebApplicationFactory, and finally continuous integration and delivery with GitHub Actions, where your build and tests run automatically on every push.
With tested, automatically built code, you'll be ready for the next module, Razor Pages & Blazor, where you build user interfaces with .NET.
A tutorial on applying test-driven development to a C# .NET Core project with the xUnit testing framework, with source code available to follow along.
A beginner-friendly look at Moq: what mocking is and why it matters, how to mock dependencies, how to write testable C# code, and best practices for unit testing with mocks.
Shows how to integration test a Web API with WebApplicationFactory: setting up the test project, sending a GET request to an endpoint, and deserializing the response into a C# model to assert on the results.
Builds a test-gated CI/CD pipeline for a .NET 10 Web API in a single GitHub Actions workflow: caching NuGet packages, building in Release, running tests as a gate, publishing artifacts, and deploying only when tests pass.