Advanced ASP.NET Core: Unit Testing
2hAdvanced2024-11-21
Authors

Ervis Trupja
Full-Stack .NET Web Developer with a mathematical background
Course details
No developer wants to turn in buggy code. Unit testing is a highly efficient way to ensure that everything in your app is working by design before it's launched into production. In this course, learn how to write automated tests for your personal or commercial ASP.NET Core apps. Instructor Ervis Trupja details how to unit test ASP.NET Core console, Web API, and MVC apps. Ervis begins by providing a general overview of application testing strategies, as well as how to determine which unit testing framework is right for you. Then, he steps through how to set up and test ASP.NET Core console, Web API, and MVC apps, providing challenges along the way that allow you to put your new skills to the test.
Skills covered
ASP.NET CoreBack-End Web DevelopmentFull-Stack Web DevelopmentAdvancedFront-End Web DevelopmentWeb DevelopmentMicrosoft
Concepts
0. Introduction
- 01 - Unit testing ASP.NET Core apps
- 02 - What you should know
- 03 - Changes in ASP.NET Core
1. Get Started with Unit Testing
- 04 - Application testing strategies
- 05 - Why unit testing
- 06 - Understand the MSTest framework
- 07 - Understand the NUnit framework
- 08 - Understand the xUnit framework
- 09 - Decide between the frameworks
2. Console Applications
- 10 - ASP.NET Core console project overview
- 11 - Set up the console testing project
- 12 - xUnit Theory with InlineData
- 13 - Challenge - Test add and average methods
- 14 - Solution - Test add and average methods
- 15 - xUnit Theory with MemberData
- 16 - xUnit Theory with ClassData
3. Web API Applications
- 17 - ASP.NET Core web API project overview
- 18 - Set up web API testing project
- 19 - Unit testing HttpGet API endpoint
- 20 - Challenge - Test HttpGet API endpoint with id
- 21 - Solution - Test HttpGet API endpoint with id
- 22 - Unit testing HttpPost API endpoint
- 23 - Unit testing HttpDelete API endpoint
4. MVC Applications
- 24 - ASP.NET Core MVC project overview
- 25 - Set up MVC testing project
- 26 - Unit testing index ActionResult
- 27 - Challenge - Unit testing details ActionResult
- 28 - Solution - Unit testing details ActionResult
- 29 - Unit testing create ActionResult
- 30 - Unit testing remove ActionResult
Conclusion
- 31 - Where to go next