public void AddCommand_AddsIntentionToRepository() { // Arrange var uut = new MainViewModel(this.intentionRepository.Object); // Act uut.Add(); // Assert this.intentionRepository.Verify(o => o.TryAddIntention(It.IsAny <string>()), Times.Once); }
private void AddNewUser() { var newEmployee = new Employee(); var view = new Employees.Views.EmployeeView(); view.SetObjectToEdit = newEmployee; // gdy result jest ok to zapisuje if (view.ShowDialog() == DialogResult.OK) { var newEmployee2 = view.SetObjectToEdit; Task.Run(async() => { await _mainViewModel.Add(newEmployee2); }).Wait(); RefreshView(); } }
private static void Add(string command) { var name = command.Split(' ')[1]; _viewModel.Add(name); }
private void AddLyrics() { _viewModel.Add(Lyrics_ListView.SelectedIndex, Player.Position, LyricsContent_TextBox.Text, _isPressShift); LyricsContent_TextBox.Text = String.Empty; }