public void AddMeal()
 {
     var meal = new Meal { Id = Guid.NewGuid() };
     factories.CreateMeal().Returns(meal);
     var command = new JournalViewModel.AddMealCommand();
     sut.Add(command);
     navigator.Received().GoToMealEditing(meal.Id);
 }
예제 #2
0
 private void Add_Click(object sender, EventArgs e)
 {
     AddCommand command = new DefaultAddCommand();
     if (sender == insulinIcon)
         command = new JournalViewModel.AddInsulinCommand();
     if (sender == sugarIcon)
         command = new JournalViewModel.AddSugarCommand();
     if (sender == addIcon && Pivot.SelectedItem == Journal)
         command = new JournalViewModel.AddMealCommand();
     subConnector.Add(command);
 }