예제 #1
0
        /// <summary>
        /// Updates the view model's foodplan with recipes in selected week and year.
        /// </summary>
        private async void UpdateFoodplan()
        {
            await _foodplanModel.Update();

            var recipes = _foodplanModel.GetRecipes(_selectedWeek, _selectedYear);

            if (recipes != null)
            {
                Foodplan = new ObservableCollection <Recipe>(recipes);
                //      NotifyPropertyChanged("Foodplan");
            }
        }
예제 #2
0
 public void Update_LoginModelFoodplanIdIsLessThanZero_FoodplaCollectorNotCalled()
 {
     _userCollector.GetFoodplanId(Arg.Any <string>()).Returns(-1);
     _uut.Update();
     _foodplanCollector.DidNotReceive().GetById(Arg.Any <int>());
 }