Пример #1
0
 /// <summary>
 /// Called when the show settings command is called.
 /// </summary>
 private void OnShowSettings()
 {
     if (ShowSettingsCommand.CanExecute())
     {
         string uriString = "/Views/EditListsView.xaml";
         NavigateTo(uriString);
     }
 }
Пример #2
0
        public void CanShowSettingsCommand()
        {
            var settingsWindow = MockRepository.GenerateMock <ISettingsWindow>();

            var command = new ShowSettingsCommand(_view, settingsWindow);

            command.Execute(null);

            command.CanExecute(null).ShouldBe(true);
            settingsWindow.ShouldHaveBeenCalled(s => s.ShowDialog());
        }