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 #13
This commit is contained in:
parent
64657753a3
commit
d01455ecb2
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user