Exemple #1
0
 public ContentService(ILoggerFactory loggerFactory,
                       IContentsDataAccess contentDataAccess,
                       IValidator <Content> validator)
     : base(loggerFactory)
 {
     this._contentDataAccess = contentDataAccess;
     this._validator         = validator;
 }
Exemple #2
0
        public BaseIntegrationTests()
        {
            Init();

            var loggerFactory = new LoggerFactory();

            // data access init
            _sitesDataAccess   = new SitesDataAccess(_configuration.GetConnectionString("default"), loggerFactory);
            _pageDataAccess    = new PagesDataAccess(_configuration.GetConnectionString("default"), loggerFactory);
            _contentDataAccess = new ContentsDataAccess(_configuration.GetConnectionString("default"), loggerFactory);
            _metasDataAccess   = new MetasDataAccess(_configuration.GetConnectionString("default"), loggerFactory);
            _menuDataAccess    = new MenusDataAccess(_configuration.GetConnectionString("default"), loggerFactory);


            _metasService   = new MetasService(loggerFactory, _metasDataAccess, new MetadataValidator());
            _contentService = new ContentService(loggerFactory, _contentDataAccess, new ContentValidator());
            _siteService    = new SitesService(loggerFactory,
                                               _sitesDataAccess,
                                               new SiteValidator());

            _pageService = new PagesService(loggerFactory,
                                            _pageDataAccess, _metasService, _contentService, new PageValidator(_pageDataAccess), _siteService);
        }