Exemple #1
0
        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);
        }
Exemple #2
0
 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;
 }
Exemple #3
0
 public void CurrencyCodeValidationTest()
 {
     Assert.Throws <InvalidCurrencyCodeException>(() => CurrencyFiatCode.FromString("ZZZ"));
 }