Пример #1
0
        public static void Build1(string value)
        {
            // NB: We must use actual IBANs since Build() will compute the checksum.
            var parts  = IbanParts.Parse(value).Value;
            var result = IbanParts.Build(parts.CountryCode, parts.Bban);

            Assert.Equal(parts, result);
        }
Пример #2
0
        public static Iban Build(string countryCode, string bban)
        {
            var parts = IbanParts.Build(countryCode, bban);

            return(new Iban(parts, IbanValidationLevels.Integrity));
        }
Пример #3
0
 public static void Build2(string value)
 => Assert.DoesNotThrow(() => IbanParts.Build("FR", value));
Пример #4
0
 public static void Build0c(string value)
 => Assert.Throws <ArgumentException>("bban", () => IbanParts.Build("FR", value));
Пример #5
0
 public static void Build0b(string value)
 => Assert.Throws <ArgumentException>("countryCode", () => IbanParts.Build(value, "20041010050500013M02606"));
Пример #6
0
 public static void Build0a()
 {
     Assert.Throws <ArgumentNullException>("countryCode", () => IbanParts.Build(null, "20041010050500013M02606"));
     Assert.Throws <ArgumentNullException>("bban", () => IbanParts.Build("FR", null));
 }