Extends Verify to allow verification of CommunityToolkit.Mvvm.
Entity Framework Extensions is a major sponsor and is proud to contribute to the development this project.
[ModuleInitializer]
public static void Initialize() =>
VerifyCommunityToolkitMvvm.Initialize();[Fact]
public Task RelayCommand()
{
var content = new RelayCommand(ActionMethod, CanExecuteMethod);
return Verify(content);
}Results in:
{
Execute: Tests.ActionMethod,
CanExecute: Tests.CanExecuteMethod
}[Fact]
public Task AsyncRelayCommand()
{
var content = new AsyncRelayCommand(ActionMethodAsync, CanExecuteMethod);
return Verify(content);
}Results in:
{
Execute: Tests.ActionMethodAsync,
CanExecute: Tests.CanExecuteMethod
}