Пример #1
0
 public QuoteSpecialService(ISaveQuoteRepository saveQuoteRepository, IUserInfoRepository userInfoRepository, ILoginService loginService, ISubmitInfoRepository submitInfoRepository,
                            IQuoteResultRepository quoteResultRepository, ILastInfoRepository lastInfoRepository, IAgentRepository agentRepository, IMessageCenter messageCenter,
                            ICarInfoRepository carInfoRepository, IRenewalQuoteRepository renewalQuoteRepository, IQuoteReqCarinfoRepository quoteReqCarinfoRepository, IQuoteResultCarinfoRepository quoteResultCarinfoRepository,
                            ICacheHelper cacheHelper, ICarInsuranceCache carInsuranceCache, ICarRenewalRepository carRenewalRepository, IDeviceDetailRepository detailRepository, IAgentConfigRepository agentConfig, INoticexbService noticexbService, IConfigRepository configRepository,
                            ICarModelRepository carModelRepository, IMultiChannelsService multiChannelsService, ICheckRequestGetPrecisePrice checkRequestGetPrecisePrice, ICheckRequestGetSubmitInfo checkRequestGetSubmitInfo, IGetAgentInfoService getAgentInfoService, ISpecialOptionService specialOptionService)
     : base(agentRepository, cacheHelper)
 {
     _saveQuoteRepository          = saveQuoteRepository;
     _userInfoRepository           = userInfoRepository;
     _loginService                 = loginService;
     _infoRepository               = lastInfoRepository;
     _submitInfoRepository         = submitInfoRepository;
     _quoteResultRepository        = quoteResultRepository;
     _agentRepository              = agentRepository;
     _messageCenter                = messageCenter;
     _carInfoRepository            = carInfoRepository;
     _carInsuranceCache            = carInsuranceCache;
     _carRenewalRepository         = carRenewalRepository;
     _detailRepository             = detailRepository;
     _quoteReqCarinfoRepository    = quoteReqCarinfoRepository;
     _quoteResultCarinfoRepository = quoteResultCarinfoRepository;
     _agentConfig                 = agentConfig;
     _noticexbService             = noticexbService;
     _configRepository            = configRepository;
     _carModelRepository          = carModelRepository;
     _multiChannelsService        = multiChannelsService;
     _checkRequestGetPrecisePrice = checkRequestGetPrecisePrice;
     _checkRequestGetSubmitInfo   = checkRequestGetSubmitInfo;
     _getAgentInfoService         = getAgentInfoService;
     _specialOptionService        = specialOptionService;
 }
Пример #2
0
 public GetNewVehicleInfoService(IValidateService validateService, IGetAgentInfoService getAgentInfoService, IUserInfoRepository userInfoRepository,
                                 IQuoteReqCarinfoRepository quoteReqCarinfoRepository, IGetMoldNameFromCenter getMoldNameFromCenter, IMessageCenter messageCenter)
 {
     _validateService           = validateService;
     _getAgentInfoService       = getAgentInfoService;
     _userInfoRepository        = userInfoRepository;
     _quoteReqCarinfoRepository = quoteReqCarinfoRepository;
     _getMoldNameFromCenter     = getMoldNameFromCenter;
     _messageCenter             = messageCenter;
 }
        public GetIntelligentReInfoService(IAgentRepository agentRepository, ICacheHelper cacheHelper,
            IGetAgentInfoService getAgentInfoService, ICarInfoRepository carInfoRepository, ICarRenewalRepository carRenewalRepository,
            IGetIntelligentInsurance getIntelligentInsurance, IRenewalStatusService renewalStatusService) : base(agentRepository, cacheHelper)
        {
            _agentRepository = agentRepository;
            _getAgentInfoService = getAgentInfoService;
            _carInfoRepository = carInfoRepository;
            _carRenewalRepository = carRenewalRepository;
            _getIntelligentInsurance = getIntelligentInsurance;
            _renewalStatusService = renewalStatusService;

        }
Пример #4
0
        public void Validate_AgentCanUse_NextCalled()
        {
            //配置
            IGetAgentInfoService getAgentInfoService = Substitute.For <IGetAgentInfoService>();
            ICheckGetSecCode     checkGetSecCode     = Substitute.For <ICheckGetSecCode>();

            getAgentInfoService.GetAgentModelFactory(Arg.Any <int>()).Returns(new bx_agent()
            {
                IsUsed = 1
            });
            ValidateService validateService = new ValidateService(getAgentInfoService, checkGetSecCode);

            //操作
            var result = validateService.Validate(new BaseRequest()
            {
                Agent = 1
            }, null);

            //断言
            checkGetSecCode.Received().ValidateReqest(null, Arg.Any <string>(), Arg.Any <string>());
        }
Пример #5
0
        public void Validate_AgentNoUse_ReturnForbidden(int useState, HttpStatusCode expectedCode)
        {
            //配置
            IGetAgentInfoService getAgentInfoService = Substitute.For <IGetAgentInfoService>();
            ICheckGetSecCode     checkGetSecCode     = Substitute.For <ICheckGetSecCode>();

            getAgentInfoService.GetAgentModelFactory(Arg.Any <int>()).Returns(new bx_agent()
            {
                IsUsed = useState
            });
            ValidateService validateService = new ValidateService(getAgentInfoService, checkGetSecCode);

            //操作
            var result = validateService.Validate(new BaseRequest()
            {
                Agent = 1
            }, null);

            //断言
            Assert.AreEqual(expectedCode, result.Status);
        }
Пример #6
0
 public GetReInfoMainService(IManagerRoleRepository managerRoleRepository, IGetAgentInfoService getAgentInfoService, IFiterAndRepeatDataService fiterAndRepeatDataService,
                             IUserInfoRepository userInfoRepository, IAgentRepository agentRepository, ICheckCarNeedDrivingInfoService checkCarNeedDrivingInfoService,
                             IQuoteReqCarinfoRepository quoteReqCarinfoRepository, IMessageCenter messageCenter, ICarInsuranceCache carInsuranceCache, ICarRenewalRepository carRenewalRepository, ICarInfoRepository carInfoRepository,
                             IBatchRenewalRepository batchRenewalRepository, ISentDistributedService sentDistributedService, IGetReInfoState getReInfoState,
                             IToCenterFromReInfoService toCenterFromReInfoService)
 {
     _managerRoleRepository          = managerRoleRepository;
     _getAgentInfoService            = getAgentInfoService;
     _fiterAndRepeatDataService      = fiterAndRepeatDataService;
     _userInfoRepository             = userInfoRepository;
     _agentRepository                = agentRepository;
     _checkCarNeedDrivingInfoService = checkCarNeedDrivingInfoService;
     _quoteReqCarinfoRepository      = quoteReqCarinfoRepository;
     _messageCenter             = messageCenter;
     _carInsuranceCache         = carInsuranceCache;
     _carRenewalRepository      = carRenewalRepository;
     _carInfoRepository         = carInfoRepository;
     _batchRenewalRepository    = batchRenewalRepository;
     _sentDistributedService    = sentDistributedService;
     _getReInfoState            = getReInfoState;
     _toCenterFromReInfoService = toCenterFromReInfoService;
 }
Пример #7
0
        public void Validate_SecCodeNoPass_ReturnFalse(bool useState, HttpStatusCode expectedCode)
        {
            //配置
            IGetAgentInfoService getAgentInfoService = Substitute.For <IGetAgentInfoService>();
            ICheckGetSecCode     checkGetSecCode     = Substitute.For <ICheckGetSecCode>();

            getAgentInfoService.GetAgentModelFactory(Arg.Any <int>()).Returns(new bx_agent()
            {
                IsUsed = 1
            });
            checkGetSecCode.ValidateReqest(null, Arg.Any <string>(), Arg.Any <string>()).Returns(useState);

            ValidateService validateService = new ValidateService(getAgentInfoService, checkGetSecCode);

            //操作
            var result = validateService.Validate(new BaseRequest()
            {
                Agent = 1
            }, null);

            //断言
            Assert.AreEqual(expectedCode, result.Status);
        }
Пример #8
0
 public PostThirdPartService(IGetAgentInfoService getAgentInfoService, IConfigRepository configRepository)
 {
     _getAgentInfoService = getAgentInfoService;
     _configRepository    = configRepository;
 }
Пример #9
0
 public ValidateService(IGetAgentInfoService getAgentInfoService, ICheckGetSecCode checkGetSecCode)
 {
     _getAgentInfoService = getAgentInfoService;
     _checkGetSecCode     = checkGetSecCode;
 }