Unit Testing an ASP.NET Core Web API


by Kevin Dockx

Course Overview
  1. Course Overview
Introduction to Unit Testing
  1. Coming Up
  2. Positioning This Course
  3. Course Prerequisites
  4. Frameworks and Tooling
  5. Demo - Introducing the Demo Scenario
  6. The What, Why, and What Not of Unit Testing
  7. Comparing Unit Tests, Integration Test, and Functional Tests
  8. Demo - Adding a Unit Test Project
  9. Demo - Writing Your First Unit Test
  10. Naming Guidelines for Unit Tests
  11. The Arrange, Act, Assert Pattern
  12. Comparing xUnit, NUnit, and MSTest
  13. Summary
Tackling Basic Unit Testing Scenarios
  1. Coming Up
  2. Learning About Assertions
  3. Demo - Asserting on Booleans
  4. Demo - Asserting on Strings
    • example of how to make Assert.Equal case insensitive
  5. Demo - Asserting on Numeric Values
  6. Demo - Asserting on Floating Points with Precision
    • shows how to specify precision when using Assert.Equal with floating numbers
  7. Demo - Introducing a Repository Implementation with Test Data
  8. Demo - Asserting on Arrays and Collection Content
  9. Demo - Asserting Asynchronous Code
  10. Demo - Asserting on Exceptions
  11. Demo - Asserting on Events
  12. Demo - Asserting on Object Types
  13. Asserting on Private Methods
  14. Summary
Setting Up Tests and Controlling Test Execution
  1. Coming Up
  2. Setting Up Tests and Sharing Test Context
  3. Demo - Sharing Context with the Constructor and Dispose Approach
  4. Demo - Sharing Context with the Class Fixture Approach
  5. Demo - Sharing Context with the Collection Fixture Approach
  6. Integrating Test Context with the ASP.NET Core Dependency Injection System
  7. Demo - Integrating Test Context with the ASP.NET Core Dependency Injection System
  8. Demo - Categorizing and Running Subsets of Tests
  9. Demo - Skipping Tests
  10. Demo - Adding Additional Test Output
  11. Summary
Working with Data-driven Tests
  1. Coming Up
  2. Introducing Theories and Data-driven Tests
  3. Demo - Testing a Theory with Inline Data
  4. Demo - Testing a Theory with Member Data
  5. Demo - Testing a Theory with Class Data
  6. Demo - Testing a Theory with Strongly-typed Test Data
  7. Getting Data from an External Source
  8. Demo - Getting Data from an External Source
  9. Summary
Isolating Unit Tests with ASP.NET Core Techniques and Mocking
  1. Coming Up
  2. Investigating Test Isolation Approaches
  3. Unit Testing with Entity Framework Core
  4. Demo - Using SQLite In-memory Mode for Unit Testing
  5. Unit Testing with HttpClient
  6. Demo - Unit Testing with HttpClient
  7. Introducing Moq
  8. Demo - Creating and Using a Mock Object
  9. Demo - Configuring Mock Object Return Values
  10. Demo - Mocking an Interface
  11. Demo - Mocking Async Code
  12. Which Test Isolation Approach Should You Use?
  13. Summary
Unit Testing ASP.NET Core API Controllers
  1. Coming Up
  2. Code Coverage and Deciding What to Unit Test
  3. Introduction to Testing API Controllers
  4. Demo - Verifying ActionResult Types when Testing
  5. Demo - Verifying Model Types when Testing
  6. Demo - Verifying Model Content when Testing
  7. Demo - Combining Controller Action Asserts in One Unit Test and Testing Mapping Code
  8. Demo - Dealing with AutoMapper Dependencies
  9. Demo - Testing Validation and ModelState
  10. Testing with HttpContext
  11. Demo - Testing with HttpContext.Features
  12. Demo - Testing with HttpContext.User
  13. Demo - Testing with HttpClient Calls
  14. Summary
Unit Testing ASP.NET Core Middleware, Filters and Service Registrations
  1. Coming Up
  2. Unit Testing Middleware
  3. Demo - Unit Testing Middleware
  4. Unit Testing ASP.NET Core Filters
  5. Demo - Unit Testing ASP.NET Core Filters
  6. Unit Testing Service Registrations
  7. Demo - Unit Testing Service Registrations
  8. Summary
Integrating Unit Tests In Your Development and Release Flows
  1. Coming Up
  2. Demo - Running Tests with the CLI
  3. Test Runners Versus Test Frameworks
  4. Running Tests in Parallel
  5. Demo - Parallelism in Test Frameworks
  6. Demo - Parallelism in Test Runners
  7. Running Tests against Multiple Target Frameworks
  8. Demo - Running Tests Against Multiple Target Frameworks
  9. Integrating Unit Tests in Your CI/CD Pipeline
  10. Demo - Integrating Unit Tests in Your CI/CD Pipeline
  11. Summary

Comments

Popular posts from this blog

Angular Services

Angular Reactive Forms