Ejemplo n.º 1
0
        private void ShowDialog(Func <AddTextCustomDialogViewModel, bool?> showDialog)
        {
            var dialogViewModel = new AddTextCustomDialogViewModel();

            bool?success = showDialog(dialogViewModel);

            if (success == true)
            {
                Texts.Add(dialogViewModel.Text !);
            }
        }
Ejemplo n.º 2
0
        public void Ok(string text, bool?expectedDialogResult)
        {
            // Arrange
            var viewModel = new AddTextCustomDialogViewModel
            {
                Text = text
            };

            // Act
            viewModel.OkCommand.Execute(null);

            // Assert
            Assert.That(viewModel.DialogResult, Is.EqualTo(expectedDialogResult));
        }
 public void SetUp()
 {
     viewModel = new AddTextCustomDialogViewModel();
 }