public void CheckWithErrorResultInOverlay_ValidProfile_ReturnTrue_DoNotRaiseMessageInteraction() { _profileChecker.CheckJob(_job).Returns(new ActionResult()); //valid profile var result = _interactiveProfileChecker.CheckWithErrorResultInOverlay(_job); Assert.IsTrue(result, "Return value"); _interactionRequest.AssertWasNotRaised <MessageInteraction>(); }
public void Execute_SettingsCheckResultNoChangesNoErrors_NoUserInteraction_IsDoneCalledWithSuccess() { _tabSwitchSettingsCheck.CheckAffectedSettings().Returns(_resultNoChangesNoErrors); _beforeEvaluateTabSwitchCommand.Execute(null); Assert.IsTrue(_commandTester.IsDoneWasRaised); Assert.AreEqual(ResponseStatus.Success, _commandTester.LastResponseStatus); _interactionRequest.AssertWasNotRaised <MessageInteraction>(); }
public void NoSpecificRegion_ChangesInSettings_ErrorsInProfiles_ErrorsInAppSettings__NoUserInteraction_CallsIsDoneWithSuccess() { SetCurrentRegion("No Specific Region"); _settingsChanged.HaveChanged().Returns(true); SetErrorsInAppSettings(); //Should be ignored SetErrorsInProfiles(); //Should be ignored _command.Execute(null); Assert.IsTrue(_commandTester.IsDoneWasRaised); Assert.AreEqual(ResponseStatus.Success, _commandTester.LastResponseStatus); _interactionRequest.AssertWasNotRaised <MessageInteraction>(); }
public void SaveCommand_Execute_JobProfileIsValid_NoUserNotification() { var expectedPassword = "******"; var vm = BuildViewModel(); var job = BuildJob(_pdfProfile); job.Profile.PdfSettings.Security.OwnerPassword = expectedPassword; _interactiveProfileChecker.CheckWithErrorResultInOverlay(job).Returns(true); vm.ExecuteWorkflowStep(job); vm.SaveCommand.Execute(null); _interactionRequest.AssertWasNotRaised <MessageInteraction>(); }
public void OnlineActivationCommand_CurrentActivationIsValid_LicenseCheckerActivationIsValid_ShareLicenseForAllUsersDisabled__SaveLicenseAndInformUser() { _expectedLicenseKey = "not empty"; CreateLicenseKeyEnteredInteraction(_expectedLicenseKey); _activationFromServer = BuildValidActivation(_expectedLicenseKey); var viewModel = BuildViewModel(); viewModel.ShareLicenseForAllUsersEnabled = false; //Important for this test!!!! viewModel.OnlineActivationCommand.Execute(null); viewModel.LicenseCheckFinishedEvent.WaitOne(_timeout); _licenseChecker.Received().SaveActivation(_activationFromServer); _interactionRequest.AssertWasNotRaised <StoreLicenseForAllUsersInteraction>(); var messageInteraction = _interactionRequest.AssertWasRaised <MessageInteraction>(); Assert.AreEqual(_translation.ActivationSuccessful, messageInteraction.Title); Assert.AreEqual(_translation.ActivationSuccessfulMessage, messageInteraction.Text); Assert.AreEqual(MessageOptions.OK, messageInteraction.Buttons); Assert.AreEqual(MessageIcon.PDFForge, messageInteraction.Icon); }
public void Execute_ParameterIsNoHistoricFileList_DoesNotThrowException_CallsDoneWithError() { MacroCommandIsDoneEventArgs calledArgs = null; _deleteHistoricFilesCommand.IsDone += (sender, args) => calledArgs = args; Assert.DoesNotThrow(() => _deleteHistoricFilesCommand.Execute(null)); Assert.AreEqual(ResponseStatus.Error, calledArgs.ResponseStatus); _unitTestInteractionRequest.AssertWasNotRaised <IInteraction>(); }
public void EditAccount_GivenParameterIsNotSmtpAccount_NoInteraction() { _smtpAccountEditCommand.Execute(null); _interactionRequest.AssertWasNotRaised <SmtpAccountInteraction>(); }
public void Execute_GivenParameterIsNoDropboxAccount_NoInteraction() { _dropboxAccountRemoveCommand.Execute(null); _interactionRequest.AssertWasNotRaised <MessageInteraction>(); }
public void Execute_GivenParameterIsNotHttpAccount_NoInteraction() { _httpAccountRemoveCommand.Execute(null); _interactionRequest.AssertWasNotRaised <HttpAccountInteraction>(); }