Пример #1
0
        public async Task VerifyMessageNullWhenInputWithinMaxLength(String input)
        {
            var maxLength         = 5;
            var notNullValidation = new ValidationCharacterLimit(maxLength);
            var result            = await notNullValidation.ValidateAsync(input);

            Assert.AreEqual(null, result);
        }
Пример #2
0
        public async Task VerifyMessageReturnedWhenMaxLengthExceeded(String input)
        {
            var maxLength         = 5;
            var expectedMessage   = String.Format(Constant.Messages.Violations.MaxLengthExceeded, maxLength);
            var notNullValidation = new ValidationCharacterLimit(5);
            var result            = await notNullValidation.ValidateAsync(input);

            Assert.AreEqual(expectedMessage, result);
        }