public void Execute_VerifyUserResponse_No_CallsIsDoneWithSkip_CurrentSettingsCallsReset() { _tabSwitchSettingsCheck.CheckAffectedSettings().Returns(_resultWithChangesWithErrors); _interactionRequest.RegisterInteractionHandler <MessageInteraction>(i => { i.Response = MessageResponse.No; }); _beforeEvaluateTabSwitchCommand.Execute(null); Assert.IsTrue(_commandTester.IsDoneWasRaised); Assert.AreEqual(ResponseStatus.Skip, _commandTester.LastResponseStatus); _currentSettingsProvider.Received(1).Reset(); }
public void Save_ProfileHasNoTargetDirectory_LastSaveDirectoryGetsSetAndSaved() { _job.Profile.TargetDirectory = String.Empty; _job.OutputFilenameTemplate = Path.Combine(LastSaveDirectory, SomeFilename); _lastSaveDirectoryHelper.Save(_job); Received.InOrder(() => { _currentSettingsProvider.Received(); _settingsManager.Received().SaveCurrentSettings(); }); _settingsManager.Received(1).SaveCurrentSettings(); Assert.AreEqual(LastSaveDirectory, _currentSettings.ApplicationSettings.LastSaveDirectory, "LastSaveDirectory was not set"); }
public void VerifyUserResonse_No__ResetSettings_CallsIsDoneWithSkip() { //force user interaction SetCurrentRegion(MainRegionViewNames.ProfilesView); SetErrorsInProfiles(); // _interactionRequest.RegisterInteractionHandler <MessageInteraction>(i => { i.Response = MessageResponse.No; }); _command.Execute(null); _currentSettingsProvider.Received().Reset(); Assert.AreEqual(ResponseStatus.Skip, _commandTester.LastResponseStatus); }