public void Invalid_ExchangeRateService() { ExchangeRateService.Api = "badconnection.dk"; var res = ExchangeRateService.GetRates(); Assert.IsTrue(res == null); }
public DetailsModel(IOrderService context) { rates = ExchangeRateService.GetRates(); Currencies = new List <SelectListItem>() { new SelectListItem("USD", "USD"), new SelectListItem("DKK", "DKK"), new SelectListItem("EUR", "EUR"), new SelectListItem("GBP", "GBP"), new SelectListItem("CAD", "CAD") }; _context = context; }
public void Valid_ExchangeRateService() { var res = ExchangeRateService.GetRates(); Assert.IsTrue(res.rates.EUR > 0); }