public void Setup()
 {
     this._exchangeRateApi = A.Fake <IExchangeRateApiCachingDecorator>();
     this._marketApi       = A.Fake <IMarketOpenCloseApiCachingDecorator>();
     this._ruleApi         = A.Fake <IRuleParameterApi>();
     this._enrichmentApi   = A.Fake <IEnrichmentApi>();
     this._logger          = A.Fake <ILogger <ApiHeartbeat> >();
 }
Example #2
0
 public void Setup()
 {
     this._ruleCtx        = A.Fake <ISystemProcessOperationRunRuleContext>();
     this._apiRepository  = A.Fake <IExchangeRateApiCachingDecorator>();
     this._logger         = A.Fake <ILogger <CurrencyConverterService> >();
     this._currency       = new Currency("USD");
     this._conversionTime = new DateTime(2017, 8, 31);
 }
        public CurrencyConverterService(
            IExchangeRateApiCachingDecorator exchangeRateApi,
            ILogger <CurrencyConverterService> logger)
        {
            this._exchangeRateApi = exchangeRateApi ?? throw new ArgumentNullException(nameof(exchangeRateApi));

            this._logger = logger ?? throw new ArgumentNullException(nameof(logger));
        }
        public ExchangeRatesService(
            IExchangeRateApiCachingDecorator exchangeRateApiRepository,
            ILogger <ExchangeRatesService> logger)
        {
            this._exchangeRateApiRepository = exchangeRateApiRepository
                                              ?? throw new ArgumentNullException(nameof(exchangeRateApiRepository));

            this._logger = logger ?? throw new ArgumentNullException(nameof(logger));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ApiHeartbeat"/> class.
 /// </summary>
 /// <param name="exchangeRateApi">
 /// The exchange rate.
 /// </param>
 /// <param name="marketRateApi">
 /// The market rate.
 /// </param>
 /// <param name="rulesApi">
 /// The rules.
 /// </param>
 /// <param name="enrichmentApi">
 /// The enrichment.
 /// </param>
 /// <param name="logger">
 /// The logger.
 /// </param>
 public ApiHeartbeat(
     IExchangeRateApiCachingDecorator exchangeRateApi,
     IMarketOpenCloseApiCachingDecorator marketRateApi,
     IRuleParameterApi rulesApi,
     IEnrichmentApi enrichmentApi,
     ILogger <ApiHeartbeat> logger)
 {
     this.exchangeRateApi = exchangeRateApi ?? throw new ArgumentNullException(nameof(exchangeRateApi));
     this.marketRateApi   = marketRateApi ?? throw new ArgumentNullException(nameof(marketRateApi));
     this.rulesApi        = rulesApi ?? throw new ArgumentNullException(nameof(rulesApi));
     this.enrichmentApi   = enrichmentApi ?? throw new ArgumentNullException(nameof(enrichmentApi));
     this.logger          = logger ?? throw new ArgumentNullException(nameof(logger));
 }