public static void Create1(string value) { var iban = Iban.Parse(value).Value; var result = Iban.Create(iban.CountryCode, iban.CheckDigits, iban.Bban); Assert.Equal(iban, result); }
public static void Parse6b() { var value = "IBAN AL47212110090000000235698741"; Assert.NotNull(Iban.Parse(value, IbanStyles.AllowHeader)); Assert.True(Iban.TryParse(value, IbanStyles.AllowHeader).IsSuccess); }
public static void Build1(string value) { var iban = Iban.Parse(value).Value; var result = Iban.Build(iban.CountryCode, iban.Bban); Assert.Equal(iban, result); }
public static void CheckIntegrity1(string value, string expectedBban) { var iban = Iban.Parse(value, IbanStyles.None, IbanValidationLevels.None).Value; var result = Iban.CheckIntegrity(iban); Assert.False(result.HasValue); }
public static void CheckIntegrity3(string value) { var iban = Iban.Parse(value, IbanStyles.None, IbanValidationLevels.Integrity).Value; var result = Iban.CheckIntegrity(iban); Assert.True(result.HasValue); Assert.True(result.Value.VerificationLevels.Contains(IbanValidationLevels.Integrity)); }
public static void Parse7a() { Assert.Null(Iban.Parse("", IbanStyles.Any)); Assert.True(Iban.TryParse("", IbanStyles.Any).IsError); Assert.Null(Iban.Parse(" ", IbanStyles.Any)); Assert.True(Iban.TryParse(" ", IbanStyles.Any).IsError); Assert.Null(Iban.Parse("X ", IbanStyles.Any)); Assert.True(Iban.TryParse("X ", IbanStyles.Any).IsError); Assert.Null(Iban.Parse(" X", IbanStyles.Any)); Assert.True(Iban.TryParse(" X", IbanStyles.Any).IsError); Assert.Null(Iban.Parse("X X", IbanStyles.Any)); Assert.True(Iban.TryParse("X X", IbanStyles.Any).IsError); }
public static void Parse2b(string value) { Assert.Null(Iban.Parse(value, IbanValidationLevels.Integrity)); Assert.True(Iban.TryParse(value, IbanValidationLevels.Integrity).IsError); }
public static void Parse2a(string value) { Assert.Null(Iban.Parse(value)); Assert.True(Iban.TryParse(value).IsError); }
public static void Parse7b(string value) { Assert.NotNull(Iban.Parse(value, IbanStyles.Any)); Assert.True(Iban.TryParse(value, IbanStyles.Any).IsSuccess); }
public static void Parse6a(string value) { Assert.Null(Iban.Parse(value, IbanStyles.AllowHeader)); Assert.True(Iban.TryParse(value, IbanStyles.AllowHeader).IsError); }
public static void Parse5(string value) { Assert.NotNull(Iban.Parse(value, IbanStyles.AllowLowercaseLetter)); Assert.True(Iban.TryParse(value, IbanStyles.AllowLowercaseLetter).IsSuccess); }
public static void Parse4f(string value) { Assert.NotNull(Iban.Parse(value, IbanStyles.AllowInnerWhite)); Assert.True(Iban.TryParse(value, IbanStyles.AllowInnerWhite).IsSuccess); }
public static void Parse4e(string value) { Assert.Null(Iban.Parse(value, IbanStyles.AllowInnerWhite)); Assert.True(Iban.TryParse(value, IbanStyles.AllowInnerWhite).IsError); }
public static void Parse3(string value) { Assert.NotNull(Iban.Parse(value)); Assert.True(Iban.TryParse(value).IsSuccess); }