You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bUnit for testing Blazor components AutoFixture for generating fake test data
// 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
The text was updated successfully, but these errors were encountered:
bUnit for testing Blazor components
AutoFixture for generating fake test data
The text was updated successfully, but these errors were encountered: