Verify.CommunityToolkit.Mvvm
April 9, 2026 ยท View on GitHub
Extends Verify to allow verification of CommunityToolkit.Mvvm.
Sponsors
Entity Framework Extensions
Entity Framework Extensions is a major sponsor and is proud to contribute to the development this project.
Developed using JetBrains IDEs
NuGet
Usage
[ModuleInitializer]
public static void Initialize() =>
VerifyCommunityToolkitMvvm.Initialize();
RelayCommand
[Fact]
public Task RelayCommand()
{
var content = new RelayCommand(ActionMethod, CanExecuteMethod);
return Verify(content);
}
Results in:
{
Execute: Tests.ActionMethod,
CanExecute: Tests.CanExecuteMethod
}
AsyncRelayCommand
[Fact]
public Task AsyncRelayCommand()
{
var content = new AsyncRelayCommand(ActionMethodAsync, CanExecuteMethod);
return Verify(content);
}
Results in:
{
Execute: Tests.ActionMethodAsync,
CanExecute: Tests.CanExecuteMethod
}

