Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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();
            }
        }
Esempio n. 3
0
        private static void Add(string command)
        {
            var name = command.Split(' ')[1];

            _viewModel.Add(name);
        }
Esempio n. 4
0
 private void AddLyrics()
 {
     _viewModel.Add(Lyrics_ListView.SelectedIndex, Player.Position, LyricsContent_TextBox.Text, _isPressShift);
     LyricsContent_TextBox.Text = String.Empty;
 }