Exemplo n.º 1
0
 public FormPostingHandler(IDocumentService documentService, IFileService fileService, MailSettings mailSettings, ISession session)
 {
     _documentService = documentService;
     _session = session;
     _fileService = fileService;
     _mailSettings = mailSettings;
 }
Exemplo n.º 2
0
        public void MailSettings_SetViewData_ShouldNotThrow()
        {
            var mailSettings = new MailSettings();

            this.Invoking(tests => mailSettings.SetViewData(A.Fake<ISession>(), A.Fake<ViewDataDictionary>()))
                .ShouldNotThrow();
        }
Exemplo n.º 3
0
 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)
     };
 }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        public void MailSettings_GetDivId_ReturnsMailDashSettings()
        {
            var mailSettings = new MailSettings();

            mailSettings.DivId.Should().Be("mail-settings");
        }
Exemplo n.º 6
0
        public void MailSettings_GetTypeName_ReturnsMailSettings()
        {
            var mailSettings = new MailSettings();

            mailSettings.TypeName.Should().Be("Mail Settings");
        }
Exemplo n.º 7
0
 public IsEmailConfigured(MailSettings mailSettings)
 {
     _mailSettings = mailSettings;
 }