public void IbanUtilChangeBankCodeShouldPadItself() { string iban = "CZ6511110000192000145399"; string changed = IbanUtils.ChangeBankCode(iban, "800"); Assert.AreEqual("CZ6508000000192000145399", changed); }
public void IbanUtilChangeBankCodeWithTooLongCodeShouldThrowException() { try { string iban = "CZ6511110000192000145399"; string changed = IbanUtils.ChangeBankCode(iban, "11111"); } catch (IbanFormatException iex) { Assert.AreEqual(IbanFormatViolation.BBAN_ENTRY_TOO_LONG, iex.FormatViolation); } }