public void GetJobPasswords_ProfileContainsNotExistingFtpAccountId_ReturnsJobPasswordsWithEmptyFtpPassword() { _profile.Ftp.AccountId = "NotExistingId"; var jobPasswords = JobPasswordHelper.GetJobPasswords(_profile, _accounts); Assert.AreEqual("", jobPasswords.FtpPassword); }
public void GetJobPasswords_ProfileContainsExistingHttpAccountId_ReturnsJobPasswordsWithHttpPassword() { _profile.HttpSettings.AccountId = _httpAccount.AccountId; var jobPasswords = JobPasswordHelper.GetJobPasswords(_profile, _accounts); Assert.AreEqual(_httpAccount.Password, jobPasswords.HttpPassword); }
public void GetJobPasswords_ReturnsJobPasswordsWithPdfSignaturePassword() { _profile.PdfSettings.Signature.SignaturePassword = "******"; var jobPasswords = JobPasswordHelper.GetJobPasswords(_profile, _accounts); Assert.AreEqual(_profile.PdfSettings.Signature.SignaturePassword, jobPasswords.PdfSignaturePassword); }
private void EmailExecute(object obj) { if (IsProfileValidAndNotifyUserIfNot()) { _job.Passwords = JobPasswordHelper.GetJobPasswords(_job.Profile, _job.Accounts); _job.OutputFilenameTemplate = Path.Combine( _tempFolderProvider.TempFolder, Path.GetFileNameWithoutExtension(Path.GetRandomFileName()), OutputFilename); _job.Profile.EmailClientSettings.Enabled = true; _job.Profile.OpenViewer = false; _job.Profile.OpenWithPdfArchitect = false; FinishInteraction(); } }
protected override void DoWorkflowWork(Job job) { job.OutputFileTemplate = _targetFilePathComposer.ComposeTargetFilePath(job); job.Passwords = JobPasswordHelper.GetJobPasswords(job.Profile, job.Accounts); // Set passwords for a skipped print job window if (job.Profile.SkipPrintDialog) { if (!job.Profile.SaveFileTemporary && _interactiveProfileChecker.CheckWithErrorResultInWindow(job)) { _commandLocator.GetCommand <SkipPrintDialogCommand>().Execute(job); } else { //Enable PrintJobView for invalid profiles job.Profile.SkipPrintDialog = false; } } _logger.Debug("Starting PrintJobWindow"); try { _shellManager.ShowPrintJobShell(job); _settingsProvider.Settings.CreatorAppSettings.LastUsedProfileGuid = job.Profile.Guid; if (job.IsSuccessful) { _lastSaveDirectoryHelper.Save(job); } } finally { _directoryHelper.DeleteCreatedDirectories(); } }
private void CallFinishInteraction() { Job.Passwords = JobPasswordHelper.GetJobPasswords(Job.Profile, Job.Accounts); // Set passwords in case the profile has changed FinishInteraction(); }
private void CallFinishInteraction() { _job.Passwords = JobPasswordHelper.GetJobPasswords(_job.Profile, _job.Accounts); //todo: Why here? Aren't we doing that already somewhere else? FinishInteraction(); }