public void Setup()
 {
     this.exchangeRates = A.Fake<IExchangeRateApi>();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ExchangeRateApiCachingDecorator"/> class.
 /// </summary>
 /// <param name="api">
 /// The exchange rate.
 /// </param>
 public ExchangeRateApiCachingDecorator(IExchangeRateApi api)
 {
     this.api    = api ?? throw new ArgumentNullException(nameof(api));
     this.cache  = new ConcurrentDictionary <DateRange, CachedRates>();
     this.Expiry = TimeSpan.FromDays(1).Add(TimeSpan.FromHours(1));
 }
 public CurrencyService(IExchangeRateApi exchangeRateApi)
 {
     _exchangeRateApi = exchangeRateApi;
 }
 public CurrencyConvertorService(IExchangeRateApi exchangeRateApi)
 {
     _exchangeRateApi = exchangeRateApi;
 }
Ejemplo n.º 5
0
 public ExchangeRateController(IExchangeRateApi exchangeRateApi, IMapper mapper)
 {
     _mapper          = mapper;
     _exchangeRateApi = exchangeRateApi;
 }