public BlankPage1() { this.InitializeComponent(); var accountStorage = MainPage.GlobalSettings.Storages.AccountStorage; var categoryStorage = MainPage.GlobalSettings.Storages.CategoryStorage; var transactionStorage = MainPage.GlobalSettings.Storages.TransactionStorage; var model = new Report1ViewModel(accountStorage, categoryStorage, transactionStorage); model.Execute(); ViewModel = model; }
public void TestConstructor() { var viewModel = new Report1ViewModel(accountStorage, categoryStorage, transactionStorage); var counts = viewModel.Accounts.Count; viewModel.Account = viewModel.Accounts.FirstOrDefault(); viewModel.Execute(); Assert.AreEqual(2, counts); }
private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { ViewModel.Execute(); }