/// <summary> /// Called when the show settings command is called. /// </summary> private void OnShowSettings() { if (ShowSettingsCommand.CanExecute()) { string uriString = "/Views/EditListsView.xaml"; NavigateTo(uriString); } }
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()); }