Exemplo n.º 1
0
        public void Test_validate_with_good_data_returns_true(Football football)
        {
            // Arrange.
            // Act.
            var result = _footballValidator.Validate(football);

            // Assert.
            result.IsValid.Should().BeTrue("the football data is all made up of valid data.");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Checks if the football object is valid or not.
        /// </summary>
        /// <param name="football"> The football object we are validating. </param>
        /// <returns> If the football object is valid or not. </returns>
        public static ValidationResult IsValid(this Football football)
        {
            var validator = new FootballValidator();

            var result = validator.Validate(football);

            return(result);
        }