public async Task GetRates_HowManyRates_Correct() { //Given ExchangeRates rates = new ExchangeRates(); Currency currency = Currency.eur; //When await _fetchData.GetRates(rates, currency); //Then Assert.AreEqual(rates.eurRates.Count, 10); }
public async Task <IActionResult> Index() { ExchangeRates model = new ExchangeRates(); //fetch data await _fetchDataService.GetRates(model, Currency.usd); await _fetchDataService.GetRates(model, Currency.eur); if (model.eurRates == null || model.usdRates == null) { return(View("Error")); } return(View(model)); }