public async Task AutomaticallyUnsubscribesCommandOnViewModelClosed()
{
var vm = new CompositeCommandViewModel();
var compositeCommand = new CompositeCommand();
compositeCommand.RegisterCommand(vm.TestCommand1, vm);
Assert.IsFalse(vm.IsTestCommand1Executed);
await vm.CloseViewModelAsync(false);
compositeCommand.Execute();
Assert.IsFalse(vm.IsTestCommand1Executed);
}
}