In this video, I will cover how to pass test data to XUnit test methods.
00:00 - Creating XUnit test project
00:35 - NuGet packages needed for the XUnit test project
02:00 - Test methods taking input parameter
03:00 - InlineData attribute for passing test data
04:00 - Assert Test method with input parameter
05:00 - MemberData attribute for passing test data
06:38 - Test method with multiple input parameters
08:00 - ClassData attribute for passing test data
#csharp #dotnet #xunit #unittesting #dotnet7 #csharp11
Some of my popular videos:
Elasticsearch with .NET and introduction: https://youtu.be/9tkrDqMbFMg
Hangfire Scheduling an introduction: https://youtu.be/sQyY0xvJ4-o
ASP.NET Core Authentication with JWT (JSON Web Token): https://youtu.be/vWkPdurauaA
Running Background tasks using IHostedService and BackgroundService (In ASP.NET Core 3.1): https://youtu.be/1Fe7QD7Ovi8
How to build an API Gateway in ASP.NET Core using Ocelot (Build API Gateway in a few minutes): https://youtu.be/hlUGZ6Hmv6s
My blog site: https://dotnetcorecentral.com