public AdminController(
     ISettingService settingService,
     RestServiceSettings settings)
 {
     _settingService = settingService;
     _settings = settings;
 }
 public AdminController(
     ISettingService settingService,
     RestServiceSettings settings)
 {
     _settingService = settingService;
     _settings       = settings;
 }
示例#3
0
        public LApiController(ICacheManager cacheManager,
            RestServiceSettings settings,
            IStateProvinceService stateProvinceService,
            INhaXeService nhaxeService,
            ILocalizationService localizationService,
            IWorkContext workContext,
             IPhieuGuiHangService phieuguihangService,
            IHangHoaService hanghoaService,
            ICustomerService customerService,
            IChonVeService chonveService,
            IDiaChiService diachiService,
            INhanVienService nhanvienService,
            IPermissionService permissionService,
            CustomerSettings customerSettings,
            ICustomerRegistrationService customerRegistrationService,
            ICustomerActivityService customerActivityService,
            IGenericAttributeService genericAttributeService,
            IXeInfoService xeinfoService,
            IHanhTrinhService hanhtrinhService,
            IPriceFormatter priceFormatter,
            IBenXeService benxeService,
             IVeXeService vexeService,
            IPhoiVeService phoiveService,
            IShoppingCartService shoppingCartService,
            IAuthenticationService authenticationService,
            INhaXeCustomerService nhaxecustomerService,
            ILimousineBanVeService limousinebanveService
            )
        {
            this._cacheManager = cacheManager;
            this._limousinebanveService = limousinebanveService;
            this._settings = settings;
            this._stateProvinceService = stateProvinceService;
            this._nhaxeService = nhaxeService;
            this._hanghoaService = hanghoaService;
            this._phieuguihangService = phieuguihangService;
            this._localizationService = localizationService;
            this._workContext = workContext;
            this._customerService = customerService;
            this._chonveService = chonveService;
            this._diachiService = diachiService;
            this._nhanvienService = nhanvienService;
            this._permissionService = permissionService;
            this._customerSettings = customerSettings;
            this._customerRegistrationService = customerRegistrationService;
            this._customerActivityService = customerActivityService;
            this._genericAttributeService = genericAttributeService;
            this._xeinfoService = xeinfoService;
            this._hanhtrinhService = hanhtrinhService;
            this._priceFormatter = priceFormatter;
            this._benxeService = benxeService;
            this._vexeService = vexeService;
            this._phoiveService = phoiveService;
            this._shoppingCartService = shoppingCartService;
            this._authenticationService = authenticationService;
            this._nhaxecustomerService = nhaxecustomerService;

        }
        public void GetVacantDriversUrl__ReturnValidUrlWithRightQueryParams()
        {
            // Arrange
            var host                = _faker.Internet.DomainName();
            var version             = $"v{_faker.Random.Int(min: 1, max: 9)}";
            var restServiceSettings = new RestServiceSettings()
            {
                DriverApi = new RestServiceSettings.Service()
                {
                    Host    = host,
                    Version = version
                }
            };
            var urlBuilder = CreateTestedComponent(restServiceSettings);
            var onDateTime = _faker.Date.Recent();
            // Act
            var url = urlBuilder.GetVacantDriversUrl(onDateTime);
            // Assert
            var urlEncodedOnDateTime = WebUtility.UrlEncode(onDateTime.ToString("s"));
            var validUrl             = $"{host}/{version}/driver/vacant?onDateTime={urlEncodedOnDateTime}";

            Assert.Equal(validUrl, url);
        }
 private DriverRestServiceUrlBuilder CreateTestedComponent(RestServiceSettings restServiceSettings)
 {
     return(new DriverRestServiceUrlBuilder(restServiceSettings));
 }
 public DriverRestServiceUrlBuilder(RestServiceSettings restServiceSettings)
 {
     _restServiceSettings = restServiceSettings;
 }