public void AddInsulin() { var command = new JournalViewModel.AddInsulinCommand(); sut.Add(command); navigator.Received().GoToNewInsulin(); factories.DidNotReceive().CreateSugar(); }
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); }