Antwan  Larson

Antwan Larson


.NET 5 REST API Tutorial 10 - Unit Testing and TDD

Get the source code:
My Complete .NET Microservices Learning Path:

Topics covered:
00:00 Video overview
00:41 What is Unit Testing?
04:56 What is Test Driven Development (TDD)?
07:12 Unit testing frameworks in .NET
08:02 Moving the REST API to its own directory
12:02 Creating the xUnit test project
12:52 Building multiple projects in VS Code via build.proj
18:13 Adding the test class
19:48 Adding tests for GetItemAsync
22:12 The AAA pattern
23:11 Adding stubs via the Moq framework
30:29 Running tests in VS Code
31:42 Using the .NET Core Test Explorer extension
41:38 Comparing object properties via FluentAssertions
45:22 Testing GetItemsAsync
49:19 Testing CreateItemAsync
54:38 Excluding missing members when comparing objects
56:50 Testing UpdateItemAsync
1:01:29 Testing DeleteItemAsync
1:03:34 Switching Item from record to class and adding Description
1:04:54 Switching DTOs to positional records
1:07:50 Fixing the code base
1:11:07 Fixing a failing test
1:14:27 Using TDD to add a new feature
1:15:41 Adding a test before implementing the new functionality
1:20:59 Auto generating the new method to implement
1:22:47 Getting green by implementing the new functionality
1:24:56 Verifying the new feature via Postman

Twitter: @julioc

#dotnet #restapi #tutorial

#restapi #dotnet 5 #unit testing and tdd

.NET 5 REST API Tutorial 10 - Unit Testing and TDD