public void IbanUtilChangeAccountNumberShouldPadItself() { string iban = "CZ6508000000999999999999"; string changed = IbanUtils.ChangeAccountNumber(iban, "145399"); Assert.AreEqual("CZ4508000000990000145399", changed); }
public void IbanUtilChangeAccountNumber() { string iban = "CZ6508000000999999999999"; string changed = IbanUtils.ChangeAccountNumber(iban, "2000145399"); Assert.AreEqual("CZ5208000000992000145399", changed); }
public void IbanUtilChangeAccountNumberWithTooLongNumberShouldThrowException() { try { string iban = "CZ6508000000999999999999"; string changed = IbanUtils.ChangeAccountNumber(iban, "0000192000145399123"); } catch (IbanFormatException iex) { Assert.AreEqual(IbanFormatViolation.BBAN_ENTRY_TOO_LONG, iex.FormatViolation); } }