Esempio n. 1
0
        /// <summary>
        /// Method to validate model
        /// </summary>
        /// <returns>Returns the result of validation</returns>
        protected override FluentValidation.Results.ValidationResult Validate()
        {
            var validator = new PageValidator();

            return(validator.Validate(this));
        }
        public void Validate_NullRequest_ReturnsExpectedMessage()
        {
            var errorMessage = _validator.Validate(null);

            Assert.AreEqual(PageValidator.ErrorMessage.REQUIRED, errorMessage);
        }