Пример #1
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;
 }
Пример #2
0
 public void ParseCountryIso3CodeFailTest()
 {
     Assert.Throws <InvalidCountryCodeException>(() => GdCountryIso3Code.FromString("ZZ"));
 }
Пример #3
0
        public void ParseCountryIso3CodeTest(string code)
        {
            GdCountryIso3Code countryCode = GdCountryIso3Code.FromString(code);

            Assert.Equal(code.ToUpper(), countryCode.Code);
        }