Extends Verify to allow verification of CommunityToolkit.Mvvm.
https://nuget.org/packages/Verify.CommunityToolkit.Mvvm/
[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()
}