Пример #1
0
        public ControllerTestBase()
        {
            organizationServiceMockSetup = new Mock <IOrganizationService>();
            organizationService          = organizationServiceMockSetup.Object;
            channelServiceMockSetup      = new Mock <IChannelService>();
            channelService = channelServiceMockSetup.Object;
            serviceAndChannelServiceMockSetup = new Mock <IServiceAndChannelService>();
            //serviceAndChannelService = serviceAndChannelServiceMockSetup.Object;
            serviceServiceMockSetup = new Mock <IServiceService>();
            serviceService          = serviceServiceMockSetup.Object;
            commonServiceMockSetup  = new Mock <ICommonService>();
            commonService           = commonServiceMockSetup.Object;
            codeServiceMockSetup    = new Mock <ICodeService>();
            codeService             = codeServiceMockSetup.Object;
            gdServiceMockSetup      = new Mock <IGeneralDescriptionService>();
            gdService = gdServiceMockSetup.Object;

            userServiceMockSetup = new Mock <IUserOrganizationService>();
            userServiceMockSetup.Setup(u => u.GetAllUserOrganizations()).Returns(new List <Guid>()
            {
                Guid.NewGuid()
            });
            userService = userServiceMockSetup.Object;

            var settingsMock = new Mock <IOptions <AppSettings> >();

            settingsMock.Setup(s => s.Value).Returns(new AppSettings());
            settings = settingsMock.Object;
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceBaseController"/> class.
 /// </summary>
 /// <param name="serviceService">The service service.</param>
 /// <param name="commonService">The common service.</param>
 /// <param name="codeService">The code service.</param>
 /// <param name="settings">The settings.</param>
 /// <param name="generalDescriptionService">The general description service.</param>
 /// <param name="fintoService">The finto service.</param>
 /// <param name="serviceAndChannelService">The service and channel service.</param>
 /// <param name="channelService">The channel service.</param>
 /// <param name="userOrganizationService">The user organization service.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="versionNumber">Open api version.</param>
 public ServiceBaseController(
     IServiceService serviceService,
     ICommonService commonService,
     ICodeService codeService,
     IOptions <AppSettings> settings,
     IGeneralDescriptionService generalDescriptionService,
     IFintoService fintoService,
     IServiceAndChannelService serviceAndChannelService,
     IChannelService channelService,
     IUserOrganizationService userOrganizationService,
     ILogger logger,
     int versionNumber)
     : base(serviceAndChannelService, serviceService, channelService, userOrganizationService, settings, logger, versionNumber)
 {
     this.serviceService            = serviceService;
     this.generalDescriptionService = generalDescriptionService;
     this.serviceAndChannelService  = serviceAndChannelService;
     this.codeService             = codeService;
     this.fintoService            = fintoService;
     this.commonService           = commonService;
     this.channelService          = channelService;
     this.userOrganizationService = userOrganizationService;
     pageSize           = Settings.PageSize > 0 ? Settings.PageSize : 1000;
     this.versionNumber = versionNumber;
 }
Пример #3
0
 public ServiceController(
     IServiceService serviceService,
     ICarrierService carrierService)
 {
     _carrierService = carrierService;
     _serviceService = serviceService;
 }
Пример #4
0
        /// <summary>
        /// Ctor - service collection validator
        /// </summary>
        /// <param name="model">Service model</param>
        /// <param name="commonService">Common service</param>
        /// <param name="serviceService">Service service</param>
        /// <param name="newLanguages">Languages that should be validated within lists</param>
        /// <param name="userOrganizations">List of user organizations</param>
        public ServiceCollectionValidator(
            IVmOpenApiServiceCollectionInVersionBase model,
            ICommonService commonService,
            IServiceService serviceService,
            IList <string> newLanguages,
            IList <Guid> userOrganizations
            ) : base(model, "ServiceCollection")
        {
            if (model == null)
            {
                throw new ArgumentNullException(PropertyName, $"{PropertyName} must be defined.");
            }

            names            = new LanguageItemListValidator(model.ServiceCollectionNames, "ServiceCollectionNames", newLanguages);
            status           = new PublishingStatusValidator(model.PublishingStatus, model.CurrentPublishingStatus);
            mainOrganization = new UserOrganizationIdValidator(model.MainResponsibleOrganization, commonService, userOrganizations, "MainResponsibleOrganization");

            // Validate service ids
            if (model.ServiceCollectionServices != null)
            {
                services = new ServiceIdListValidator(model.ServiceCollectionServices.ToList(), serviceService, "Services");
            }

            this.newLanguages = newLanguages;
        }
 public ServiceController()
 {
     IValidationDictionary validationDictionary = new ModelStateWrapper(ModelState);
     _service = new ServiceService(validationDictionary);
     _clientInServicesService = new ClientInServicesService(validationDictionary);
     _ctx = new CurrentContext();
 }
Пример #6
0
 //public UiDataService() { }
 public UiDataService(
     ILanguageService languageService,
     ISliderService sliderService,
     IMenuService menuService,
     ICategoryService categoryService,
     IProductImageService productImageService,
     IProductService productService,
     IContactService contactService,
     IContactInformationService contactInformationService,
     IProjectService projectService,
     IServiceService serviceService,
     IGlobalTextDataService globalTextDataService)
 {
     this.languageService           = languageService;
     this.sliderService             = sliderService;
     this.menuService               = menuService;
     this.categoryService           = categoryService;
     this.productImageService       = productImageService;
     this.productService            = productService;
     this.contactService            = contactService;
     this.contactInformationService = contactInformationService;
     this.projectService            = projectService;
     this.serviceService            = serviceService;
     this.globalTextDataService     = globalTextDataService;
 }
 public BlogpostController(
     IServiceService serviceService,
     IBlogpostService blogpostService)
 {
     _serviceService  = serviceService;
     _blogpostService = blogpostService;
 }
        public ServicesViewModel(IServiceService serviceService)
        {
            this.serviceService = serviceService;


            Services = serviceService.Get();
        }
Пример #9
0
 public ServiceController(IUnitOfWork uow, IServiceService postService, ITagService tagService, IServiceCategoryService categotyService)
 {
     _uow                    = uow;
     _serviceService         = postService;
     _tagService             = tagService;
     _serviceCategoryService = categotyService;
 }
Пример #10
0
 public ServiceController(
     IServiceService propertyService,
     ICarrierService carrierService)
 {
     _carrierService = carrierService;
     _serviceService = propertyService;
 }
Пример #11
0
 public ServiceAndChannelService(IContextManager contextManager,
                                 ITranslationEntity translationEntToVm,
                                 ITranslationViewModel translationVmtoEnt,
                                 ILogger <ServiceAndChannelService> logger,
                                 ServiceUtilities utilities,
                                 DataUtils dataUtils,
                                 IServiceService serviceService,
                                 IChannelService channelService,
                                 IPublishingStatusCache publishingStatusCache,
                                 IVersioningManager versioningManager,
                                 IUserOrganizationChecker userOrganizationChecker,
                                 ICacheManager cacheManager,
                                 IUserOrganizationService userOrganizationService
                                 )
     : base(translationEntToVm, translationVmtoEnt, publishingStatusCache, userOrganizationChecker)
 {
     this.contextManager          = contextManager;
     this.logger                  = logger;
     this.utilities               = utilities;
     this.dataUtils               = dataUtils;
     this.serviceService          = serviceService;
     this.channelService          = channelService;
     this.versioningManager       = versioningManager;
     this.userOrganizationService = userOrganizationService;
     typesCache = cacheManager.TypesCache;
 }
        private void Setup()
        {
            var options = new DbContextOptionsBuilder <ApplicationContext>().Options;

            _applicationContextMock = new Mock <ApplicationContext>(options);
            _testedService          = new ServiceService(Logger, _applicationContextMock.Object);
        }
Пример #13
0
 public CostItemController(ICostItemService costItemService, ILogger <CostItemController> logger, IUserService userService, IServiceService serviceService)
 {
     _costItemService = costItemService;
     _logger          = logger;
     _userService     = userService;
     _serviceService  = serviceService;
 }
Пример #14
0
 public CostSubItemController(ICostSubItemService costSubItemService, ICostItemService costItemService, IUserService userService, IServiceService serviceService)
 {
     _costSubItemService = costSubItemService;
     _costItemService    = costItemService;
     _userService        = userService;
     _serviceService     = serviceService;
 }
Пример #15
0
 public PaymentService(IUnitOfWork uniofWork, UserManager <User> userManager, ILogger logger, IServiceService serviceService)
 {
     _userManager    = userManager;
     _serviceService = serviceService;
     _uniofWork      = uniofWork;
     _logger         = logger;
 }
 /// <summary>
 /// Constructor of service and channel connections controller
 /// </summary>
 /// <param name="serviceAndChannelService">service and channel connections service responsible for operation related to service and channel connections - injected by framework</param>
 /// <param name="serviceService">service service responsible for operation related to service - injected by framework</param>
 /// <param name="channelService">channel service responsible for operation related to channel - injected by framework</param>
 /// <param name="serviceManager">manager responsible for wrapping of individual service call to UI output format - injected by framework</param>
 /// <param name="logger">logger commponent to support logging - injected by framework</param>
 public RESTServiceAndChannelController(IServiceAndChannelService serviceAndChannelService, IServiceService serviceService, IChannelService channelService, IServiceManager serviceManager, ILogger <RESTServiceController> logger) : base(logger)
 {
     this.serviceAndChannelService = serviceAndChannelService;
     this.serviceService           = serviceService;
     this.channelService           = channelService;
     this.serviceManager           = serviceManager;
 }
Пример #17
0
 public PolicyController(IPolicyService transactionService, IIdentityService identityService, IVehicleService vehicleService, IServiceService serviceService, IMapper mapper)
 {
     _policyService   = transactionService;
     _identityService = identityService;
     _vehicleService  = vehicleService;
     _serviceService  = serviceService;
     _mapper          = mapper;
 }
Пример #18
0
        public ServiceController()
        {
            const string connectionString = @"server=192.168.11.70\SQLEXPRESS,1433;database=abraham;uid=sa;password=toto;Application Name=Homer";

            _serviceRepository     = new ServiceRepository(connectionString);
            _serviceTypeRepository = new ServiceTypeRepository(connectionString);
            _service = new ServiceService(_serviceRepository, _serviceTypeRepository);
        }
 public ConfigurationController(ILogger <ConfigurationController> logger,
                                IConfigurationService configurationService,
                                IServiceService serviceService)
 {
     _logger               = logger;
     _serviceService       = serviceService;
     _configurationService = configurationService;
 }
Пример #20
0
 public StockController(IComposantService composantService, IServiceService serviceService, IGammeService gammeService, IPersonneService personneService)
 {
     this._composantService = composantService;
     this._serviceService   = serviceService;
     this._gammeService     = gammeService;
     this._personneService  = personneService;
     this._service          = "Gestion des stocks";
 }
Пример #21
0
 public ServiceController(
     IServiceService serviceService,
     IMapper mapper
     )
 {
     _serviceService = serviceService;
     _Mapper         = mapper;
 }
Пример #22
0
 public AccountController(IAccountService accountService, IShipperService shipperService, IStoreService storeService, ICustomerService customerService, IServiceService serviceService)
 {
     _accountService  = accountService;
     _shipperService  = shipperService;
     _storeService    = storeService;
     _customerService = customerService;
     _serviceService  = serviceService;
 }
Пример #23
0
 public EventPlanningController(IMLService mLService, IServiceService serviceService, IEventService eventService, IServicePackageService servicePackageService, IBlobService blobService)
 {
     this.mLService             = mLService;
     this.serviceService        = serviceService;
     this.eventService          = eventService;
     this.servicePackageService = servicePackageService;
     this.blobService           = blobService;
 }
Пример #24
0
 public ModuleController(IModuleService moduleService, IServiceService serviceService, ITModuleService tmoduleService, IComposantService composantService, ICompositionService compositionService)
 {
     this._moduleService      = moduleService;
     this._serviceService     = serviceService;
     this._tmoduleService     = tmoduleService;
     this._composantService   = composantService;
     this._compositionService = compositionService;
     this._service            = "Recherche & développement";
 }
Пример #25
0
 public TransactionController(IServiceGroupService serviceGr, IErrorService errorService, IServiceService serviceService, ITransactionDetailService transactionDetailService, ITransactionService transactionService, IApplicationUserService userService) : base(errorService)
 {
     this._transactionService  = transactionService;
     _transactionDetailService = transactionDetailService;
     this._errorService        = errorService;
     _serviceService           = serviceService;
     _userService = userService;
     _serviceGr   = serviceGr;
 }
 public ContentController(
     ILocalizedEntityService localizedEntityService,
     IServiceService serviceService,
     IContentService contetnService)
 {
     _localizedEntityService = localizedEntityService;
     _serviceService         = serviceService;
     _contentService         = contetnService;
 }
Пример #27
0
 public ServiceTest(
     TestConfig testConfig
     )
 {
     testConfig.InitTransaction();
     _storeService   = testConfig.ServiceProvider.GetRequiredService <IStoreService>();
     _cityService    = testConfig.ServiceProvider.GetRequiredService <ICityService>();
     _serviceService = testConfig.ServiceProvider.GetRequiredService <IServiceService>();
 }
 public EmailNotificationService(IAppointmentService appointmentService,
                                 IClientService clientService, IDoctorService doctorService,
                                 IServiceService serviceService)
 {
     _appointmentService = appointmentService;
     _clientService      = clientService;
     _doctorService      = doctorService;
     _serviceService     = serviceService;
 }
Пример #29
0
 public TourServiceController(ITourInfoService tourInfoService, IUserService userService,
                              IFriendService friendService, ITourService tourService, IServiceService serviceService)
 {
     _tourInfoService = tourInfoService;
     _userService     = userService;
     _friendService   = friendService;
     _tourService     = tourService;
     _serviceService  = serviceService;
 }
Пример #30
0
 public BlogpostController(
     ILocalizedEntityService localizedEntityService,
     IServiceService serviceService,
     IBlogpostService blogpostService)
 {
     _localizedEntityService = localizedEntityService;
     _serviceService         = serviceService;
     _blogpostService        = blogpostService;
 }
 public ProjectScheduleEntryTypeController(IProjectScheduleEntryTypeService projectScheduleEntryTypeService,
                                           IUserService userService,
                                           IProjectTypeService projectTypeService, IServiceService serviceService)
 {
     _projectScheduleEntryTypeService = projectScheduleEntryTypeService;
     _userService        = userService;
     _projectTypeService = projectTypeService;
     _serviceService     = serviceService;
 }
 public ClientInServicesService(IValidationDictionary validationDictionary,
     IClientInServicesRepository repository)
 {
     _validationDictionary = validationDictionary;
     _repository = repository;
     //_clientService = new ClientService(validationDictionary);
     _serviceService = new ServiceService(validationDictionary);
     //_transactionService = new AccountTransactionService(validationDictionary);
     _userHelper = new UserHelper();
     _userFasade = new UserFacade(_validationDictionary);
 }
 public DealController(
     IBus bus,
     ILeadRepository leadRepository,
     IDealRepository dealRepository,
     IEmployeeService employeeService,
     IServiceService serviceService)
 {
     _bus = bus;
     _leadRepository = leadRepository;
     _dealRepository = dealRepository;
     _employeeService = employeeService;
     _serviceService = serviceService;
 }
Пример #34
0
 public ServiceController(IPermissionService permissionService,
     IServiceService ServiceService, 
     ILanguageService languageService, 
     ILocalizationService localizationService, 
     ILocalizedEntityService localizedEntityService, 
     IPictureService pictureService, 
     IUrlRecordService urlRecordService, 
     ICustomerActivityService customerActivityService, IDateTimeHelper dateTimeHelper)
 {
     _permissionService = permissionService;
     _serviceService = ServiceService;
     _languageService = languageService;
     _localizationService = localizationService;
     _localizedEntityService = localizedEntityService;
     _pictureService = pictureService;
     _urlRecordService = urlRecordService;
     _customerActivityService = customerActivityService;
     _dateTimeHelper = dateTimeHelper;
 }
Пример #35
0
 public ServiceReadController(IServiceService serviceService,
     IPictureService pictureService)
 {
     _serviceService = serviceService;
     _pictureService = pictureService;
 }
Пример #36
0
 public ServiceController(ISystemService systemService, IServiceService service)
 {
     _systemService = systemService;
     _service = service;
 }
Пример #37
0
        public ServiceController(IProductService productService,IServiceService serviceService,IWorkContext workContext)
		{
			_productService = productService;
            _serviceService = serviceService;
            _workContext = workContext;
		}