Ejemplo n.º 1
0
        public ServiceDomainController(IServiceDomainService serviceDomainService,
                                       IServiceDeskService serviceDeskService,
                                       IDomainTypeRefDataService domainTypeRefDataService,
                                       IParameterService parameterService,
                                       ITemplateService templateService,
                                       IContextManager contextManager,
                                       IAppUserContext appUserContext)
        {
            if (serviceDomainService == null)
            {
                throw new ArgumentNullException(nameof(serviceDomainService));
            }

            if (serviceDeskService == null)
            {
                throw new ArgumentNullException(nameof(serviceDeskService));
            }

            if (domainTypeRefDataService == null)
            {
                throw new ArgumentNullException(nameof(domainTypeRefDataService));
            }

            if (parameterService == null)
            {
                throw new ArgumentNullException(nameof(parameterService));
            }

            if (templateService == null)
            {
                throw new ArgumentNullException(nameof(templateService));
            }

            if (contextManager == null)
            {
                throw new ArgumentNullException(nameof(contextManager));
            }

            if (appUserContext == null)
            {
                throw new ArgumentNullException(nameof(appUserContext));
            }

            _serviceDomainService     = serviceDomainService;
            _serviceDeskService       = serviceDeskService;
            _domainTypeRefDataService = domainTypeRefDataService;
            _parameterService         = parameterService;
            _templateService          = templateService;
            _contextManager           = contextManager;
            _appUserContext           = appUserContext;
        }
Ejemplo n.º 2
0
 public AssignServiceDetailController(IAssignServiceDetailAppService appService, AssignServiceDetailValidator validator,
                                      IConfigurationRoot configuration, IMailService mailService, IAssignServiceDomainService assignServiceDomainService,
                                      IProfessionalDomainService professionalDomainService, IPatientDomainService patientDomainService,
                                      IServiceDomainService serviceDomainService)
 {
     _appService    = appService;
     _validator     = validator;
     _configuration = configuration;
     _mailService   = mailService;
     _assignServiceDomainService = assignServiceDomainService;
     _professionalDomainService  = professionalDomainService;
     _patientDomainService       = patientDomainService;
     _serviceDomainService       = serviceDomainService;
 }
Ejemplo n.º 3
0
        public ServiceFunctionController(IServiceDomainService serviceDomainService,
                                         IServiceFunctionService serviceFunctionService,
                                         IFunctionTypeRefDataService functionTypeRefDataService,
                                         IParameterService parameterService,
                                         IContextManager contextManager,
                                         IAppUserContext appUserContext)
        {
            if (serviceDomainService == null)
            {
                throw new ArgumentNullException(nameof(serviceDomainService));
            }

            if (serviceFunctionService == null)
            {
                throw new ArgumentNullException(nameof(serviceFunctionService));
            }

            if (functionTypeRefDataService == null)
            {
                throw new ArgumentNullException(nameof(functionTypeRefDataService));
            }

            if (parameterService == null)
            {
                throw new ArgumentNullException(nameof(parameterService));
            }

            if (contextManager == null)
            {
                throw new ArgumentNullException(nameof(contextManager));
            }

            if (appUserContext == null)
            {
                throw new ArgumentNullException(nameof(appUserContext));
            }

            _serviceDomainService       = serviceDomainService;
            _serviceFunctionService     = serviceFunctionService;
            _functionTypeRefDataService = functionTypeRefDataService;
            _parameterService           = parameterService;
            _contextManager             = contextManager;
            _appUserContext             = appUserContext;
        }
        public TransformTemplateToDesign(IServiceDeskService serviceDeskService,
                                         IServiceDomainService serviceDomainService,
                                         IServiceFunctionService serviceFunctionService,
                                         IServiceComponentService serviceComponentService,
                                         IDomainTypeRefDataService domainTypeRefDataService,
                                         IFunctionTypeRefDataService functionTypeRefDataService,
                                         IServiceDeliveryOrganisationTypeRefDataService serviceDeliveryOrganisationTypeRefDataService,
                                         IServiceDeliveryUnitTypeRefDataService serviceDeliveryUnitTypeRefDataService,
                                         IResolverGroupTypeRefDataService resolverGroupTypeRefDataService,
                                         IUserIdentity userIdentity)
        {
            if (serviceDeskService == null)
            {
                throw new ArgumentNullException(nameof(serviceDeskService));
            }
            if (serviceDomainService == null)
            {
                throw new ArgumentNullException(nameof(serviceDomainService));
            }
            if (serviceFunctionService == null)
            {
                throw new ArgumentNullException(nameof(serviceFunctionService));
            }
            if (serviceComponentService == null)
            {
                throw new ArgumentNullException(nameof(serviceComponentService));
            }
            if (domainTypeRefDataService == null)
            {
                throw new ArgumentNullException(nameof(domainTypeRefDataService));
            }
            if (functionTypeRefDataService == null)
            {
                throw new ArgumentNullException(nameof(functionTypeRefDataService));
            }
            if (serviceDeliveryOrganisationTypeRefDataService == null)
            {
                throw new ArgumentNullException(nameof(serviceDeliveryOrganisationTypeRefDataService));
            }
            if (serviceDeliveryUnitTypeRefDataService == null)
            {
                throw new ArgumentNullException(nameof(serviceDeliveryUnitTypeRefDataService));
            }
            if (resolverGroupTypeRefDataService == null)
            {
                throw new ArgumentNullException(nameof(resolverGroupTypeRefDataService));
            }
            if (userIdentity == null)
            {
                throw new ArgumentNullException(nameof(userIdentity));
            }

            _serviceDeskService         = serviceDeskService;
            _serviceDomainService       = serviceDomainService;
            _serviceFunctionService     = serviceFunctionService;
            _serviceComponentService    = serviceComponentService;
            _domainTypeRefDataService   = domainTypeRefDataService;
            _functionTypeRefDataService = functionTypeRefDataService;
            _serviceDeliveryOrganisationTypeRefDataService = serviceDeliveryOrganisationTypeRefDataService;
            _serviceDeliveryUnitTypeRefDataService         = serviceDeliveryUnitTypeRefDataService;
            _resolverGroupTypeRefDataService = resolverGroupTypeRefDataService;
            _userIdentity = userIdentity;
        }
Ejemplo n.º 5
0
 public ServiceAppService(IServiceDomainService service)
 {
     this.service = service;
 }
Ejemplo n.º 6
0
        public void TestInitilize()
        {
            _mockUnitOfWork = new Mock <IUnitOfWork>();
            var dateTimeNow = DateTime.Now;

            _serviceDomainTypes = new List <DomainTypeRefData>
            {
                new DomainTypeRefData
                {
                    Id         = 1,
                    DomainName = "Computing & Device Services",
                    SortOrder  = 5,
                    Visible    = true
                },
                new DomainTypeRefData
                {
                    Id         = 2,
                    DomainName = "Computing Services",
                    SortOrder  = 5,
                    Visible    = true
                },
                new DomainTypeRefData
                {
                    Id         = 3,
                    DomainName = "Device Services",
                    SortOrder  = 5,
                    Visible    = true
                }
            };


            _serviceDesks = new List <ServiceDesk>
            {
                new ServiceDesk
                {
                    Id             = 1,
                    DeskName       = "Desk A",
                    DeskInputTypes = new List <DeskInputType>(),
                    ServiceDomains = new List <ServiceDomain>(),
                    CustomerId     = 1
                },
                new ServiceDesk
                {
                    Id         = 2,
                    DeskName   = "Desk B",
                    CustomerId = 2
                },
                new ServiceDesk
                {
                    Id         = 3,
                    DeskName   = "Desk C",
                    CustomerId = 3
                },
                new ServiceDesk
                {
                    Id         = 4,
                    DeskName   = "Desk D",
                    CustomerId = 4
                },
            };

            _serviceDomains = new List <ServiceDomain>
            {
                new ServiceDomain
                {
                    Id           = 1,
                    DomainType   = _serviceDomainTypes.FirstOrDefault(x => x.Id == 1),
                    ServiceDesk  = _serviceDesks.FirstOrDefault(x => x.Id == 1),
                    InsertedBy   = UserNameOne,
                    InsertedDate = dateTimeNow,
                    UpdatedBy    = UserNameOne,
                    UpdatedDate  = dateTimeNow
                },
                new ServiceDomain
                {
                    Id           = 2,
                    DomainType   = _serviceDomainTypes.FirstOrDefault(x => x.Id == 2),
                    ServiceDesk  = _serviceDesks.FirstOrDefault(x => x.Id == 1),
                    InsertedBy   = UserNameOne,
                    InsertedDate = dateTimeNow,
                    UpdatedBy    = UserNameOne,
                    UpdatedDate  = dateTimeNow
                },
                new ServiceDomain
                {
                    Id           = 3,
                    DomainType   = _serviceDomainTypes.FirstOrDefault(x => x.Id == 3),
                    ServiceDesk  = _serviceDesks.FirstOrDefault(x => x.Id == 1),
                    InsertedBy   = UserNameOne,
                    InsertedDate = dateTimeNow,
                    UpdatedBy    = UserNameOne,
                    UpdatedDate  = dateTimeNow
                }
            };

            _mockServiceDomainRepository = MockRepositoryHelper.Create(_serviceDomains);

            _serviceDomainService = new ServiceDomainService(
                _mockServiceDomainRepository.Object, _mockUnitOfWork.Object);

            Bootstrapper.SetupAutoMapper();
        }