1
0
mirror of https://github.com/chylex/.NET-Community-Toolkit.git synced 2025-04-10 11:15:45 +02:00

Add unit test for build error reported in

This commit is contained in:
Sergio Pedri 2021-12-17 13:51:14 +01:00
parent 64657753a3
commit d01455ecb2

View File

@ -270,6 +270,30 @@ public async Task Test_ICommandAttribute_ConcurrencyControl_AsyncRelayCommandOfT
Assert.IsTrue(model.AwaitForInputTaskCommand.CanExecute(null));
}
// See https://github.com/CommunityToolkit/dotnet/issues/13
[TestMethod]
public void Test_ICommandAttribute_ViewModelRightAfterRegion()
{
ViewModelForIssue13 model = new();
Assert.IsNotNull(model.GreetCommand);
Assert.IsInstanceOfType(model.GreetCommand, typeof(RelayCommand));
}
#region Region
public class Region
{
}
#endregion
public partial class ViewModelForIssue13
{
[ICommand]
private void Greet()
{
}
}
public sealed partial class MyViewModel
{
public Task? ExternalTask { get; set; }