Exemplo n.º 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);
     }
 }
Exemplo n.º 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());
        }