public TestOCAPIClients(SFCCEnvironmentFixture fixture) { _sitesClient = fixture.ServiceProvider.GetService <ISites>(); _jobsClient = fixture.ServiceProvider.GetService <IJobs>(); _globalPreferencesClient = fixture.ServiceProvider.GetService <IGlobalPreferences>(); _orderSearchClient = fixture.ServiceProvider.GetService <IOrderSearch>(); _ordersClient = fixture.ServiceProvider.GetService <IOrders>(); _jobSearchClient = fixture.ServiceProvider.GetService <IJobExecutionSearch>(); _codeVersionsClient = fixture.ServiceProvider.GetService <ICodeVersions>(); }
public ContentsController() { _contentHandler = new ContentRepository(); _categoriesHandler = new CategoriesRepository(); _sitesHandler = new SitesRepository(); // Настройка AutoMapper Mapper.Initialize(cfg => cfg.CreateMap <Contents, ContentViewModel>() .ForMember("introtext", opt => opt.MapFrom(c => new HtmlString(c.introtext)))); }