// Install bUnit
dotnet new --install bunit.template
// Install the latest bUnit project template
dotnet new --install bunit.template::1.2.49
// Navigate to the solution folder and create a test project
dotnet new bunit -o ProjectName.Tests
// Add the test project to the solution
dotnet sln add ProjectName.Tests/ProjectName.Tests.csproj
// Add a package reference for AutoFixture
<PackageReference Include="AutoFixture" Version="4.17.0" />
// Add using statements to the _Imports.razor file
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.Extensions.DependencyInjection
@using AutoFixture
@using Bunit.JSInterop.InvocationHandlers
@using MediatR
// Add a reference to the project containing the components to test