public void Setup() { this._apiManager = A.Fake <IBmllDataRequestsApiManager>(); this._policyFactory = A.Fake <IPolicyFactory>(); this._storageManager = A.Fake <IBmllDataRequestsStorageManager>(); this._logger = A.Fake <ILogger <BmllDataRequestsManager> >(); }
public void Setup() { this.httpClientFactory = new HttpClientFactory(NullLogger <HttpClientFactory> .Instance); this.configuration = TestHelpers.Config(); this.policyFactory = A.Fake <IPolicyFactory>(); this.logger = A.Fake <ILogger <BrokerApi> >(); }
public GildedRose(IList <Item> items) { Ensure.ArgumentNotNull(items, nameof(items)); _items = items; _factory = new PolicyFactory(); }
public MetricsHandler( IPolicyFactory policyFactory, string httpServiceName) { _policyFactory = policyFactory ?? throw new ArgumentNullException(nameof(policyFactory)); _httpServiceName = httpServiceName ?? throw new ArgumentNullException(nameof(httpServiceName)); }
public WebsiteDownloader( [NotNull] IPolicyFactory policyFactory, [NotNull] Func <Uri, IRestClient> restClientFactory) { PolicyFactory = policyFactory ?? throw new ArgumentNullException(nameof(policyFactory)); RestClientFactory = restClientFactory ?? throw new ArgumentNullException(nameof(restClientFactory)); }
public void Setup() { this.httpClientFactory = A.Fake <IHttpClientFactory>(); this.configuration = TestHelpers.Config(); this.policyFactory = A.Fake <IPolicyFactory>(); this.logger = A.Fake <ILogger <EnrichmentApi> >(); }
public PolicyManagement(IPolicyFactory _policyFactory, IFileReader _fileReader, IFileWriter _fileWriter) { policyFactory = _policyFactory; fileReader = _fileReader; fileWriter = _fileWriter; }
/// <summary> /// Initializes a new instance of the <see cref="EnrichmentApi"/> class. /// </summary> /// <param name="apiClientConfiguration"> /// The client configuration. /// </param> /// <param name="httpClientFactory"> /// The http client factory. /// </param> /// <param name="policyFactory"> /// The policy factory. /// </param> /// <param name="logger"> /// The logger. /// </param> public EnrichmentApi( IApiClientConfiguration apiClientConfiguration, IHttpClientFactory httpClientFactory, IPolicyFactory policyFactory, ILogger <EnrichmentApi> logger) : base(apiClientConfiguration, httpClientFactory, policyFactory, logger) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public FormRegistrator( [NotNull] SettingsManager settingsManager, [NotNull] Func <Uri, IRestClient> restClientFactory, [NotNull] IPolicyFactory policyFactory) { SettingsManager = settingsManager ?? throw new ArgumentNullException(nameof(settingsManager)); RestClientFactory = restClientFactory ?? throw new ArgumentNullException(nameof(restClientFactory)); PolicyFactory = policyFactory ?? throw new ArgumentNullException(nameof(policyFactory)); }
public void Setup() { this._requestsGetTimeBars = A.Fake <IBmllDataRequestsGetTimeBars>(); this._marketDataRequestProjector = A.Fake <IMarketDataRequestToMinuteBarRequestKeyDtoProjector>(); this._timeBarRepository = A.Fake <IBmllTimeBarApi>(); this._policyFactory = A.Fake <IPolicyFactory>(); this._logger = A.Fake <ILogger <BmllDataRequestsApiManager> >(); A.CallTo(() => this._timeBarRepository.HeartBeatingAsync(A <CancellationToken> .Ignored)).Returns(true); }
/// <summary> /// Initializes a new instance of the <see cref="BaseClientServiceApi"/> class. /// </summary> /// <param name="apiClientConfiguration"> /// The client configuration. /// </param> /// <param name="httpClientFactory"> /// The http client factory. /// </param> /// <param name="policyFactory"> /// The policy factory. /// </param> /// <param name="logger"> /// The logger. /// </param> public BaseClientServiceApi( IApiClientConfiguration apiClientConfiguration, IHttpClientFactory httpClientFactory, IPolicyFactory policyFactory, ILogger <BaseClientServiceApi> logger) { this.apiClientConfiguration = apiClientConfiguration ?? throw new ArgumentNullException(nameof(apiClientConfiguration)); this.httpClientFactory = httpClientFactory ?? throw new ArgumentNullException(nameof(httpClientFactory)); this.policyFactory = policyFactory ?? throw new ArgumentNullException(nameof(policyFactory)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public BmllDataRequestsManager( IBmllDataRequestsApiManager apiManager, IBmllDataRequestsStorageManager storageManager, IPolicyFactory policyFactory, ILogger <BmllDataRequestsManager> logger) { this._apiManager = apiManager ?? throw new ArgumentNullException(nameof(apiManager)); this._storageManager = storageManager ?? throw new ArgumentNullException(nameof(storageManager)); this._policyFactory = policyFactory ?? throw new ArgumentNullException(nameof(policyFactory)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <summary> /// Initializes a new instance of the <see cref="BmllTimeBarApi"/> class. /// </summary> /// <param name="dataLayerConfiguration"> /// The data layer configuration. /// </param> /// <param name="httpClientFactory"> /// The http client factory. /// </param> /// <param name="policyFactory"> /// The policy factory. /// </param> /// <param name="logger"> /// The logger. /// </param> public BmllTimeBarApi( IApiClientConfiguration dataLayerConfiguration, IHttpClientFactory httpClientFactory, IPolicyFactory policyFactory, ILogger <BmllTimeBarApi> logger) { this.apiClientConfiguration = dataLayerConfiguration ?? throw new ArgumentNullException(nameof(dataLayerConfiguration)); this.httpClientFactory = httpClientFactory ?? throw new ArgumentNullException(nameof(httpClientFactory)); this.policyFactory = policyFactory ?? throw new ArgumentNullException(nameof(dataLayerConfiguration)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <summary> /// Initializes a new instance of the <see cref="ExchangeRateApi"/> class. /// </summary> /// <param name="apiClientConfiguration"> /// The client configuration. /// </param> /// <param name="httpClientFactory"> /// The http client factory. /// </param> /// <param name="policyFactory"> /// The policy factory. /// </param> /// <param name="logger"> /// The logger. /// </param> public ExchangeRateApi( IApiClientConfiguration apiClientConfiguration, IHttpClientFactory httpClientFactory, IPolicyFactory policyFactory, ILogger <ExchangeRateApi> logger) : base(apiClientConfiguration, httpClientFactory, policyFactory, logger) { this.apiClientConfiguration = apiClientConfiguration ?? throw new ArgumentNullException(nameof(apiClientConfiguration)); this.httpClientFactory = httpClientFactory ?? throw new ArgumentNullException(nameof(httpClientFactory)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public void Setup() { this._logger = A.Fake <ILogger <ExchangeRateApi> >(); this._loggerExchRate = A.Fake <ILogger <ExchangeRatesService> >(); this._ruleCtx = A.Fake <ISystemProcessOperationRunRuleContext>(); this._calculatorLogger = A.Fake <ILogger <TradePositionWeightedAverageExchangeRateService> >(); this._exchangeRatesService = A.Fake <IExchangeRatesService>(); this._currency = new Currency("GBX"); this._policyFactory = A.Fake <IPolicyFactory>(); this._configuration = A.Fake <IApiClientConfiguration>(); this._configuration.ClientServiceUrl = "http://localhost:8080"; this._configuration.SurveillanceUserApiAccessToken = "uwat"; }
public UpdateService(IIntegrationDal integrationDal, IDateTimeService dateTimeService, ITvShowUpdateService tvShowUpdateService, IWorkloadService workloadService, IPolicyFactory policyFactory, ILogger <UpdateService> logger) { _integrationDal = integrationDal; _dateTimeService = dateTimeService; _tvShowUpdateService = tvShowUpdateService; _workloadService = workloadService; _policyFactory = policyFactory; _logger = logger; }
public BmllDataRequestsApiManager( IBmllDataRequestsGetTimeBars requestsGetTimeBars, IMarketDataRequestToMinuteBarRequestKeyDtoProjector marketDataRequestProjector, IPolicyFactory policyFactory, IBmllTimeBarApi timeBarRepository, ILogger <BmllDataRequestsApiManager> logger) { this._requestsGetTimeBars = requestsGetTimeBars ?? throw new ArgumentNullException(nameof(requestsGetTimeBars)); this._marketDataRequestProjector = marketDataRequestProjector ?? throw new ArgumentNullException(nameof(marketDataRequestProjector)); this._policyFactory = policyFactory ?? throw new ArgumentNullException(nameof(policyFactory)); this._timeBarRepository = timeBarRepository ?? throw new ArgumentNullException(nameof(timeBarRepository)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public PolicyAsyncInterceptor(IPolicyFactory policyFactory) { this._policyFactory = policyFactory; }
public PermissionCalculationMergePolicyStrategy(IPolicyFactory policyFactory) { this.policyFactory = policyFactory; }
public PasswordPolicyProvider(IPolicyFactory policyFactory) { _policyFactory = policyFactory; }
public ExecutionPolicies(IPolicyFactory policyFactory) { Guard.IsNotNull(policyFactory, nameof(policyFactory)); this.policyFactory = policyFactory; }