Пример #1
0
        public void Using_custom_validator()
        {
            var model = new Movie
            {
                Id          = 1,
                Title       = "Dr. No",
                ReleaseYear = 1963
            };

            var validator = new MovieValidator(model);
            var issues    = validator.Validate();

            Assert.False(issues.HasIssues);
        }
Пример #2
0
        public override ValidationResult Validate()
        {
            var movieValidator = new MovieValidator();

            return(movieValidator.Validate(this));
        }