src/GenFx.Components.Tests/MultiPointCrossoverOperatorTest.cs
/// <summary>
/// Tests that an exception is thrown if the operator is configured incorrectly.
/// </summary>
Tests that an exception is thrown if the operator is configured incorrectly.
Tests that an exception is thrown if the operator is configured incorrectly .
[Fact]
        public void MultiPointCrossoverOperator_Validation()
        {
            MultiPointCrossoverOperator op = new MultiPointCrossoverOperator
            {
                CrossoverPointCount = 3,
            };
            MockGeneticAlgorithm algorithm = new MockGeneticAlgorithm
            {
                GeneticEntitySeed = new TestEntity
                {
                    RequiresUniqueElementValues = true
                }
            };
            op.Initialize(algorithm);
            Assert.Throws<ValidationException>(() => op.Validate());
        }
[ Fact ] public void MultiPointCrossoverOperator_Validation ( ) { MultiPointCrossoverOperator op = new MultiPointCrossoverOperator { CrossoverPointCount = 3 , } ; MockGeneticAlgorithm algorithm = new MockGeneticAlgorithm { GeneticEntitySeed = new TestEntity { RequiresUniqueElementValues = true } } ; op . Initialize ( algorithm ) ; Assert . Throws < ValidationException > ( ( ) => op . Validate ( ) ) ; }
Tests that an exception is thrown if the operator is configured incorrectly.
Tests that an exception is thrown if the operator is configured incorrectly .