public ConverterPanel GetCurrencyConverterPanel() { //not thread safe if (ExchangeRateLoader == null) { ExchangeRateLoader = new ExchangeRateLoader(_exchangeRateAPIURL); ExchangeRateLoader.Load(_exchangeRateAPIKey, new string[0]); } var currencyConverter = new CurrencyConverter(ExchangeRateLoader); var currencyCodeConverter = new CurrencyCodeConverter(_countryInformation); var display = new CurrencyConverterDisplay(currencyCodeConverter); var units = currencyConverter.Rates.Select(rate => rate.Key).ToArray(); return(GetConverterPanel(currencyConverter, display, units)); }
public void InvalidFile() { converter = new CurrencyCodeConverter("invalid.invalid"); }
public void Setup() { converter = new CurrencyCodeConverter("countryInformation.txt"); }