src/GenFx.Components.Tests/VariableSinglePointCrossoverOperatorTest.cs
/// <summary>
/// Tests that a validation exception is thrown if the operator is used with an
/// algorithm that is configured with a <see cref="ListEntityBase"/> that is a fixed size.
/// </summary>
Tests that a validation exception is thrown if the operator is used with an
algorithm that is configured with a  that is a fixed size.
Tests that a validation exception is thrown if the operator is used with an algorithm that is configured with a that is a fixed size .
[Fact]
        public async Task SinglePointCrossoverOperator_Validation_IsFixedSize()
        {
            MockGeneticAlgorithm algorithm = new MockGeneticAlgorithm
            {
                GeneticEntitySeed = new IntegerListEntity
                {
                    MinElementValue = 0,
                    MaxElementValue = 10,
                    MinimumStartingLength = 5,
                    MaximumStartingLength = 5,
                    IsFixedSize = true
                },
                PopulationSeed = new MockPopulation(),
                FitnessEvaluator = new MockFitnessEvaluator2(),
                SelectionOperator = new MockSelectionOperator(),
                CrossoverOperator = new VariableSinglePointCrossoverOperator()
            };
            await Assert.ThrowsAsync<ValidationException>(() => algorithm.InitializeAsync());
        }
[ Fact ] public async Task SinglePointCrossoverOperator_Validation_IsFixedSize ( ) { MockGeneticAlgorithm algorithm = new MockGeneticAlgorithm { GeneticEntitySeed = new IntegerListEntity { MinElementValue = 0 , MaxElementValue = 10 , MinimumStartingLength = 5 , MaximumStartingLength = 5 , IsFixedSize = true } , PopulationSeed = new MockPopulation ( ) , FitnessEvaluator = new MockFitnessEvaluator2 ( ) , SelectionOperator = new MockSelectionOperator ( ) , CrossoverOperator = new VariableSinglePointCrossoverOperator ( ) } ; await Assert . ThrowsAsync < ValidationException > ( ( ) => algorithm . InitializeAsync ( ) ) ; }
Tests that a validation exception is thrown if the operator is used with an
algorithm that is configured with a  that is a fixed size.
Tests that a validation exception is thrown if the operator is used with an algorithm that is configured with a that is a fixed size .