public void GetGdCurrencyFiat(string code, string expectedCountryCodeStr) { CurrencyFiat currency = CurrencyFiatList.Get(CurrencyFiatCode.FromString(code)); Output.WriteLine($"code: {code}, Received: {currency.Code} is expecting: {expectedCountryCodeStr}"); Assert.Contains(currency.Countries, x => x.Code == expectedCountryCodeStr); }
public static string GetFlag(this CurrencyFiat currency) { var currencyCode = CountryList.GetAll().FirstOrDefault(x => x.Currency.Code == currency.Code); if (currencyCode == null) { return(""); // throw new CurrencyCodeException(currency.Code); } return(currency.Code != "EUR" ? currencyCode.CodeIso3.Code : "eun"); }