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 Country(string name, string namePrefix, string namePostfix, string codeIso2, string codeIso3, string currencyCode, uint callingCode, uint[] callingCodes) { Name = name; NameAllCaps = name.ToUpper(); NamePrefix = namePrefix; NamePostfix = namePostfix; CodeIso2 = CountryIso2Code.FromString(codeIso2); CodeIso3 = GdCountryIso3Code.FromString(codeIso3); Currency = CurrencyFiatCode.FromString(currencyCode); CallingCode = callingCode; CallingCodes = callingCodes; }
public void CurrencyCodeValidationTest() { Assert.Throws <InvalidCurrencyCodeException>(() => CurrencyFiatCode.FromString("ZZZ")); }