예제 #1
0
 public SendQueuedMessagesTask(ISession session, IEmailSender emailSender, SiteSettings siteSettings,Site site)
 {
     _session = session;
     _emailSender = emailSender;
     _siteSettings = siteSettings;
     _site = site;
 }
예제 #2
0
 public StringResourceAdminService(IStringResourceProvider provider, SiteSettings siteSettings, 
     ISession session)
 {
     _provider = provider;
     _siteSettings = siteSettings;
     _session = session;
 }
 public ListingGroupControllerTests()
 {
     _amazonListingGroupService = A.Fake<IAmazonListingGroupService>();
     _amazonAppSettings = A.Fake<AmazonAppSettings>();
     _siteSettings = new SiteSettings() { DefaultPageSize = 10 };
     _listingGroupController = new ListingGroupController(_amazonListingGroupService, _amazonAppSettings, _siteSettings);
 }
예제 #4
0
 public ProductService(ISession session, IDocumentService documentService, SiteSettings ecommerceSettings, IUniquePageService uniquePageService)
 {
     _session = session;
     _documentService = documentService;
     _ecommerceSettings = ecommerceSettings;
     _uniquePageService = uniquePageService;
 }
예제 #5
0
 public ProductServiceTests()
 {
     _documentService = A.Fake<IDocumentService>();
     _siteSettings = new SiteSettings() { DefaultPageSize = 10 };
     _uniquePageService = A.Fake<IUniquePageService>();
     _productService = new ProductService(Session, _documentService, _siteSettings, _uniquePageService);
 }
예제 #6
0
 public PayPalUrlService(Site currentSite, PayPalExpressCheckoutSettings payPalExpressCheckoutSettings, SiteSettings siteSettings, IUniquePageService uniquePageService)
 {
     _currentSite = currentSite;
     _payPalExpressCheckoutSettings = payPalExpressCheckoutSettings;
     _siteSettings = siteSettings;
     _uniquePageService = uniquePageService;
 }
예제 #7
0
 public AppControllerTests()
 {
     _amazonLogService = A.Fake<IAmazonLogService>();
     _amazonAnalyticsService = A.Fake<IAmazonAnalyticsService>();
     _siteSettings=new SiteSettings(){DefaultPageSize = 10};
     _appController = new AppController(_amazonLogService, _amazonAnalyticsService, _siteSettings);
 }
예제 #8
0
 public UniversalSearchIndexSearcher(IUniversalSearchIndexManager universalSearchIndexManager,
     ISearchConverter searchConverter, ISession session, SiteSettings siteSettings)
 {
     _universalSearchIndexManager = universalSearchIndexManager;
     _searchConverter = searchConverter;
     _session = session;
     _siteSettings = siteSettings;
 }
예제 #9
0
파일: FileService.cs 프로젝트: neozhu/MrCMS
 public FileService(ISession session, IFileSystem fileSystem, IImageProcessor imageProcessor, MediaSettings mediaSettings, Site currentSite, SiteSettings siteSettings)
 {
     _session = session;
     _fileSystem = fileSystem;
     _imageProcessor = imageProcessor;
     _mediaSettings = mediaSettings;
     _currentSite = currentSite;
     _siteSettings = siteSettings;
 }
예제 #10
0
 public PayPalUrlServiceTests()
 {
     _currentSite = new Site {BaseUrl = "www.example.com"};
     _payPalExpressCheckoutSettings = new PayPalExpressCheckoutSettings();
     _siteSettings = new SiteSettings();
     _uniquePageService = A.Fake<IUniquePageService>();
     _payPalUrlService = new PayPalUrlService(_currentSite, _payPalExpressCheckoutSettings, _siteSettings,
         _uniquePageService);
 }
예제 #11
0
 public OrdersControllerTests()
 {
     _amazonOrderService = A.Fake<IAmazonOrderService>();
     _amazonAppSettings = A.Fake<AmazonAppSettings>();
     _amazonOrderSearchService = A.Fake<IAmazonOrderSearchService>();
     _ecommerceSettings = new SiteSettings() { DefaultPageSize = 10 };
     _amazonOrderSyncService = A.Fake<IAmazonOrderSyncService>();
     _ordersController = new OrdersController(_amazonOrderService,_amazonAppSettings,
         _amazonOrderSearchService,_ecommerceSettings,_amazonOrderSyncService);
 }
예제 #12
0
 public DefaultFormRenderer(IElementRendererManager elementRendererManager, ILabelRenderer labelRenderer,
     IValidationMessaageRenderer validationMessaageRenderer, ISubmittedMessageRenderer submittedMessageRenderer,
     SiteSettings siteSettings)
 {
     _elementRendererManager = elementRendererManager;
     _labelRenderer = labelRenderer;
     _validationMessaageRenderer = validationMessaageRenderer;
     _submittedMessageRenderer = submittedMessageRenderer;
     _siteSettings = siteSettings;
 }
예제 #13
0
파일: EmailSender.cs 프로젝트: neozhu/MrCMS
 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)
     };
 }
예제 #14
0
        public void Config_ReturnsATheSettingsConfigAsAContentResult()
        {
            var siteSettings = new SiteSettings { CKEditorConfig = "test config" };
            var controller = new CKEditorControllerBuilder().WithSettings(siteSettings).Build();

            var result = controller.Config();

            result.Should().BeOfType<ContentResult>();
            result.Content.Should().Be("test config");
            result.ContentType.Should().Be("application/javascript");
        }
예제 #15
0
 public DefaultFormRendererTests()
 {
     _formCollection = new FormCollection();
     var mockingKernel = new MockingKernel();
     MrCMSKernel.OverrideKernel(mockingKernel);
     _elementRendererManager = A.Fake<IElementRendererManager>();
     _labelRenderer= A.Fake<ILabelRenderer>();
     _validationMessageRenderer= A.Fake<IValidationMessaageRenderer>();
     _submittedMessageRenderer = A.Fake<ISubmittedMessageRenderer>();
     _siteSettings = new SiteSettings();
     _defaultFormRenderer = new DefaultFormRenderer(_elementRendererManager, _labelRenderer,
                                                    _validationMessageRenderer,_submittedMessageRenderer, _siteSettings);
 }
예제 #16
0
 public ProductControllerTests()
 {
     _documentService = A.Fake<IDocumentService>();
     _productService = A.Fake<IProductService>();
     _categoryService = A.Fake<ICategoryService>();
     _productOptionManager = A.Fake<IProductOptionManager>();
     _fileService = A.Fake<IFileAdminService>();
     _productOptionManagementService = A.Fake<IProductOptionManagementService>();
     _siteSettings = new SiteSettings {DefaultPageSize = 10};
     _uniquePageService = A.Fake<IUniquePageService>();
     _productSearch = new ProductSearch();
     _eTagAdminService = A.Fake<IETagAdminService>();
     A.CallTo(() => _uniquePageService.GetUniquePage<ProductSearch>()).Returns(_productSearch);
     _productController = new ProductController(_productService, _documentService, _categoryService,
         _productOptionManager,
         _fileService, _productOptionManagementService, _siteSettings, _uniquePageService, _eTagAdminService);
 }
예제 #17
0
        private FileService GetFileService(ISession session = null, IFileSystem fileSystem = null)
        {
            _fileSystem = A.Fake<IFileSystem>();

            _mediaSettings = new MediaSettings
                                {
                                    LargeImageHeight = 480,
                                    LargeImageWidth = 640,
                                    MediumImageHeight = 200,
                                    MediumImageWidth = 320,
                                    SmallImageHeight = 75,
                                    SmallImageWidth = 100,
                                    ThumbnailImageHeight = 64,
                                    ThumbnailImageWidth = 64
                                };
            _siteSettings = new SiteSettings();
            return new FileService(session ?? Session, fileSystem ?? _fileSystem,
                                   A.Fake<IImageProcessor>(), _mediaSettings, CurrentSite, _siteSettings);
        }
예제 #18
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);
        }
예제 #19
0
 public SiteIsLive(SiteSettings siteSettings)
 {
     _siteSettings = siteSettings;
 }
 public ExcludeFromSitemapBecauseIsErrorPage(SiteSettings siteSettings)
 {
     _siteSettings = siteSettings;
 }
예제 #21
0
 public TaskExecutionController(SiteSettings siteSettings, ITaskRunner taskRunner)
 {
     _siteSettings = siteSettings;
     _taskRunner = taskRunner;
 }
예제 #22
0
 public CKEditorController(SiteSettings siteSettings)
 {
     _siteSettings = siteSettings;
 }
예제 #23
0
 public LogsControllerTests()
 {
     _amazonLogService = A.Fake<IAmazonLogService>();
     _siteSettings = new SiteSettings() { DefaultPageSize = 10 };
     _logsController = new LogsController(_amazonLogService, _siteSettings);
 }
예제 #24
0
 public CKEditorControllerBuilder WithSettings(SiteSettings siteSettings)
 {
     _siteSettings = siteSettings;
     return this;
 }
예제 #25
0
 public MrCMSRoutingErrorHandler(IGetErrorPage getErrorPage, IControllerManager controllerManager, SiteSettings siteSettings)
 {
     _getErrorPage = getErrorPage;
     _controllerManager = controllerManager;
     _siteSettings = siteSettings;
 }
예제 #26
0
 public MrCMSAdminSSLRedirectHandler(SiteSettings siteSettings)
 {
     _siteSettings = siteSettings;
 }
예제 #27
0
 public GetLayoutOptions(ISession session, SiteSettings siteSettings)
 {
     _session = session;
     _siteSettings = siteSettings;
 }
예제 #28
0
 public GetUserCultureInfo(SiteSettings siteSettings)
 {
     _siteSettings = siteSettings;
 }
예제 #29
0
 public UserServiceTests()
 {
     _session = Session;
     _siteSettings = new SiteSettings();
     _userService = new UserService(_session,_siteSettings);
 }
예제 #30
0
 public GetErrorPage(IDocumentService documentService, SiteSettings siteSettings)
 {
     _documentService = documentService;
     _siteSettings = siteSettings;
 }