public void CheckDigitCalculationWithIbanObject() { string testIban = "CZ6508000000192000145399"; Iban testObject = new IbanBuilder().CountryCode(CountryCode.GetCountryCode("CZ")).BankCode("0800").AccountNumberPrefix("000019").AccountNumber("2000145399").Build(); string checkDigit = IbanUtils.CalculateCheckDigit(testIban); Assert.AreEqual(testIban.Substring(2, 2), checkDigit); }
public void CheckDigitCalculationWithIbanString() { string checkDigit = IbanUtils.CalculateCheckDigit("CZ6508000000192000145399"); Assert.AreEqual("65", checkDigit); }
public void CheckDigitCalculationWithInvalidBBANShouldThrowException() { IbanUtils.CalculateCheckDigit("AT000159260+076545510730339"); }