public FormPostingHandler(IDocumentService documentService, IFileService fileService, MailSettings mailSettings, ISession session) { _documentService = documentService; _session = session; _fileService = fileService; _mailSettings = mailSettings; }
public void MailSettings_SetViewData_ShouldNotThrow() { var mailSettings = new MailSettings(); this.Invoking(tests => mailSettings.SetViewData(A.Fake<ISession>(), A.Fake<ViewDataDictionary>())) .ShouldNotThrow(); }
public EmailSender(ISession session, MailSettings mailSettings, SiteSettings siteSettings) { _session = session; _siteSettings = siteSettings; _smtpClient = new SmtpClient(mailSettings.Host, mailSettings.Port) { EnableSsl = mailSettings.UseSSL, Credentials = new NetworkCredential(mailSettings.UserName, mailSettings.Password) }; }
public void Initialize(InstallModel model) { CurrentRequestData.CurrentSite = _site = _session.Get<Site>(_site.Id); SetupTasks(); var siteSettings = new SiteSettings { TimeZone = model.TimeZone, UICulture = model.UiCulture, EnableInlineEditing = true, SiteIsLive = true, FormRendererType = FormRenderingType.Bootstrap3, }; var mediaSettings = new MediaSettings { ThumbnailImageHeight = 50, ThumbnailImageWidth = 50, LargeImageHeight = 800, LargeImageWidth = 800, MediumImageHeight = 500, MediumImageWidth = 500, SmallImageHeight = 200, SmallImageWidth = 200, ResizeQuality = 90, }; var mailSettings = new MailSettings { Port = 25, }; var fileSystemSettings = new FileSystemSettings { StorageType = typeof(FileSystem).FullName }; _configurationProvider.SaveSettings(siteSettings); _configurationProvider.SaveSettings(mediaSettings); _configurationProvider.SaveSettings(mailSettings); _configurationProvider.SaveSettings(fileSystemSettings); }
public void MailSettings_GetDivId_ReturnsMailDashSettings() { var mailSettings = new MailSettings(); mailSettings.DivId.Should().Be("mail-settings"); }
public void MailSettings_GetTypeName_ReturnsMailSettings() { var mailSettings = new MailSettings(); mailSettings.TypeName.Should().Be("Mail Settings"); }
public IsEmailConfigured(MailSettings mailSettings) { _mailSettings = mailSettings; }