Exemple #1
0
        public void TestInvalidAccountTypeNotDigits()
        {
            var b = new StringBuilder(KontonummerValidator.ACCOUNTTYPE_NUM_DIGITS);

            for (int i = 0; i < KontonummerValidator.ACCOUNTTYPE_NUM_DIGITS; i++)
            {
                b.Append("A");
            }
            try
            {
                KontonummerValidator.ValidateAccountTypeSyntax(b.ToString());
                Assert.True(false);
            }
            catch (ArgumentException e)
            {
                AssertionUtils.AssertMessageContains(e, StringNumberValidator.ERROR_SYNTAX);
            }
        }
        public void TestInvalidAccountTypeNotDigits()
        {
            var b = new StringBuilder(KontonummerValidator.KontogruppeNumDigits);

            for (int i = 0; i < KontonummerValidator.KontogruppeNumDigits; i++)
            {
                b.Append("A");
            }
            try
            {
                KontonummerValidator.ValidateAccountTypeSyntax(b.ToString());
                Assert.Fail();
            }
            catch (ArgumentException e)
            {
                AssertionUtils.AssertMessageContains(e, StringNumberValidator.SyntaxErrorMessage);
            }
        }