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> >(); }
/// <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)); }
public EnrichmentService( IReddeerMarketRepository marketRepository, IOrderBrokerRepository orderBrokerRepository, IEnrichmentApi api, IBrokerApi brokerApi, ITickPriceHistoryServiceClientFactory tickPriceHistoryServiceClientFactory, ICfiInstrumentTypeMapper cfiInstrumentTypeMapper, ILogger <EnrichmentService> logger) { this._marketRepository = marketRepository ?? throw new ArgumentNullException(nameof(marketRepository)); this._orderBrokerRepository = orderBrokerRepository ?? throw new ArgumentNullException(nameof(orderBrokerRepository)); this._api = api ?? throw new ArgumentNullException(nameof(api)); this._brokerApi = brokerApi ?? throw new ArgumentNullException(nameof(brokerApi)); this._tickPriceHistoryServiceClientFactory = tickPriceHistoryServiceClientFactory ?? throw new ArgumentNullException(nameof(tickPriceHistoryServiceClientFactory)); this._cfiInstrumentTypeMapper = cfiInstrumentTypeMapper ?? throw new ArgumentNullException(nameof(cfiInstrumentTypeMapper)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }