public MainViewModel() { this.SimpleViewModel = new BasicViewModel(); this.StylesViewModel = new StylesDemoViewModel(); this.CallViewModel = new OptionViewModel<CallOption>(); this.PutViewModel = new OptionViewModel<PutOption>(); this.AsyncViewModel = new AsyncViewModel(); }
public async Task IncorrectDelegateCommand() { var vm = new AsyncViewModel(); await vm.AsyncCommand.Execute(); Assert.AreEqual(vm.Status, "Downloaded 5 houses."); }
public async Task AsyncFromDelegateCommand() { var vm = new AsyncViewModel(); await vm.AsyncCommandFromHandler.Execute(); Assert.AreEqual(vm.Status, "Downloaded 5 houses."); }
public async void TestMethod() { var vm = new AsyncViewModel(); await vm.AsyncCommandFromHandler.Execute(); Assert.AreEqual(vm.Status, "Alex"); }
public async void Blah2() { var egg = new AsyncViewModel(); await egg.AsyncCommand.Execute(); string result = egg.Status; Debug.Print(result); }
public async Task AsyncCommandOwn() { var vm = new AsyncViewModel(); var a = new AsyncCommand(null); Task executeCommand = vm.AsyncCommandOwn.ExecuteAsync(); Assert.IsFalse(vm.AsyncCommandOwn.CanExecute()); await executeCommand; Assert.IsTrue(vm.AsyncCommandOwn.CanExecute()); Assert.AreEqual(vm.Status, "Downloaded 5 houses."); }