public void TestInvalidKontonummerWrongLength() { try { KontonummerValidator.ValidateSyntax("123456789012"); Assert.True(false); } catch (ArgumentException e) { AssertionUtils.AssertMessageContains(e, StringNumberValidator.ERROR_SYNTAX); } }
public void TestInvalidKontonummerNotDigits() { try { KontonummerValidator.ValidateSyntax("abcdefghijk"); Assert.True(false); } catch (ArgumentException e) { AssertionUtils.AssertMessageContains(e, StringNumberValidator.ERROR_SYNTAX); } }
public void TestInvalidKontonummer(string kontoNr, string description) { try { KontonummerValidator.ValidateSyntax(kontoNr); Assert.Fail(description); } catch (ArgumentException e) { AssertionUtils.AssertMessageContains(e, StringNumberValidator.SyntaxErrorMessage); } }