Ejemplo n.º 1
0
        public void InProgressSetRaisesOkCommandCanExecuteChanged(bool value)
        {
            var raised = false;

            _viewModel.OkCommand.CanExecuteChanged += (sender, args) => { raised = true; };
            _viewModel.SetInProgress(value);
            Assert.IsTrue(raised);
        }
Ejemplo n.º 2
0
 public void OkCommandCanExecuteTest(bool paramsHasError, bool inProgress, bool canExecute)
 {
     _service.ConnectionParametersStub.Setup(p => p.Error).Returns(paramsHasError ? "Error!" : string.Empty);
     _viewModel.SetInProgress(inProgress);
     Assert.AreEqual(canExecute, _viewModel.OkCommand.CanExecute(null));
 }