public void ValidateProps_ShouldReturnInvalid_WhenTooManyPropsSpecified()
        {
            // Arrange
            int[] propsCounts = _fixture.CreateMany <int>(2).ToArray();

            int presentedPropsCount = propsCounts.Max();
            int requiredPropsCount  = propsCounts.Min();

            string[] presentedProps = _fixture.CreateMany <string>(presentedPropsCount).ToArray();

            string[] requiredProps = presentedProps.Take(requiredPropsCount).ToArray();

            Dictionary <string, double> figureProps = presentedProps.ToDictionary(prop => prop, _ => _fixture.Create <double>());

            TestFigureDescriptor descriptor = CreateDescriptor(requiredProps);

            // Act
            ValidationResult validationResult = descriptor.ValidateProps(figureProps);

            // Assert
            Assert.NotNull(validationResult);
            Assert.False(validationResult.IsValid);

            Assert.Equal(presentedPropsCount - requiredPropsCount, validationResult.Errors.Count);

            Assert.All(validationResult.Errors, failure => Assert.Contains(failure.PropertyName, presentedProps));
            Assert.All(validationResult.Errors, failure => Assert.Contains("is redundant", failure.ErrorMessage));

            Assert.Equal(0, descriptor.ValidatePropsValuesCalledCount);
        }
        public void ValidateProps_ShouldReturnValid_WhenAllPropsSpecified()
        {
            // Arrange
            string[] requiredProps = _fixture.CreateMany <string>().ToArray();

            Dictionary <string, double> figureProps = requiredProps.ToDictionary(prop => prop, _ => _fixture.Create <double>());

            TestFigureDescriptor descriptor = CreateDescriptor(requiredProps);

            // Act
            ValidationResult validationResult = descriptor.ValidateProps(figureProps);

            // Assert
            Assert.NotNull(validationResult);
            Assert.True(validationResult.IsValid);

            Assert.Equal(1, descriptor.ValidatePropsValuesCalledCount);
        }