Пример #1
0
        public void IbanUtilChangeAccountPrefixShouldPadItself()
        {
            string iban    = "CZ6508000000999999999999";
            string changed = IbanUtils.ChangeAccountNumberPrefix(iban, "8");

            Assert.AreEqual("CZ1508000000089999999999", changed);
        }
Пример #2
0
        public void IbanUtilChangeAccountPrefix()
        {
            string iban    = "CZ6508000000999999999999";
            string changed = IbanUtils.ChangeAccountNumberPrefix(iban, "145388");

            Assert.AreEqual("CZ8308001453889999999999", changed);
        }
Пример #3
0
 public void IbanUtilChangeAccountPrefixWithTooLongNumberShouldThrowException()
 {
     try
     {
         string iban    = "CZ6508000000999999999999";
         string changed = IbanUtils.ChangeAccountNumberPrefix(iban, "9999998");
     }
     catch (IbanFormatException iex)
     {
         Assert.AreEqual(IbanFormatViolation.BBAN_ENTRY_TOO_LONG, iex.FormatViolation);
     }
 }