Episode
Testing with the xUnit Framework - Theories and Assertions (3 of 12) | Automated Software Testing
with Leslie Richardson, Robert Green, Phil Japikse
Welcome to the Automated Software Testing series, where you will learn how to increase the efficiency and ROI of your software testing. The xUnit testing framework is the premier framework for building automated tests in C# and .NET. In this episode, Phil Japikse dives into the power and capabilities of xUnit.
Chapters
- 00:00 - Introduction
- 01:45 - Review of using Theory and InlineData
- 03:05 - Using MemberData and C# Records to run a test with various inputs
- 06:15 - Using an IEnumerable class instead of MemberData
- 08:00 - What is an Assertion?
- 10:55 - Using the Fluent assertions package
- 11:20 - Fluent date assertions
- 13:55 - String assertions
- 15:00 - Fluent string assertions
- 15:35 - Fluent wildcard and regular expression assertions
- 18:30 - Value type and numeric assertions
- 20:40 - Fluent numeric assertions
- 21:45 - Wrapup
Recommended resources
Related episodes
- Why Automated Software Testing Matters
- Testing with the xUnit Framework - Overview
- Testing with the xUnit Framework - Theories and Assertions
- Testing with the xUnit Framework - More Assertions
- BDD Style Testing with MSpec
- Mocking Dependencies and Verifying Behavior - Moq Overview
- Mocking Dependencies and Verifying Behavior - Applying Moq
- Mocking Dependencies and Verifying Behavior - Additional Moq Features
- Running Unit Tests with Azure Pipelines
- Running Unit Tests with GitHub Actions
- Integration Testing with SQL Server and EF Core
- Web Application Testing with Microsoft's Playwright
Connect
- Visual Studio | Twitter: @VisualStudio
Welcome to the Automated Software Testing series, where you will learn how to increase the efficiency and ROI of your software testing. The xUnit testing framework is the premier framework for building automated tests in C# and .NET. In this episode, Phil Japikse dives into the power and capabilities of xUnit.
Chapters
- 00:00 - Introduction
- 01:45 - Review of using Theory and InlineData
- 03:05 - Using MemberData and C# Records to run a test with various inputs
- 06:15 - Using an IEnumerable class instead of MemberData
- 08:00 - What is an Assertion?
- 10:55 - Using the Fluent assertions package
- 11:20 - Fluent date assertions
- 13:55 - String assertions
- 15:00 - Fluent string assertions
- 15:35 - Fluent wildcard and regular expression assertions
- 18:30 - Value type and numeric assertions
- 20:40 - Fluent numeric assertions
- 21:45 - Wrapup
Recommended resources
Related episodes
- Why Automated Software Testing Matters
- Testing with the xUnit Framework - Overview
- Testing with the xUnit Framework - Theories and Assertions
- Testing with the xUnit Framework - More Assertions
- BDD Style Testing with MSpec
- Mocking Dependencies and Verifying Behavior - Moq Overview
- Mocking Dependencies and Verifying Behavior - Applying Moq
- Mocking Dependencies and Verifying Behavior - Additional Moq Features
- Running Unit Tests with Azure Pipelines
- Running Unit Tests with GitHub Actions
- Integration Testing with SQL Server and EF Core
- Web Application Testing with Microsoft's Playwright
Connect
- Visual Studio | Twitter: @VisualStudio
Have feedback? Submit an issue here.