src/GenFx.Components.Tests/VariableSinglePointCrossoverOperatorTest.cs
/// <summary>
/// Tests that a validation exception is thrown if the operator is used with an
/// algorithm that is not configured with a <see cref="ListEntityBase"/>.
/// </summary>
Tests that a validation exception is thrown if the operator is used with an
algorithm that is not configured with a .
Tests that a validation exception is thrown if the operator is used with an algorithm that is not configured with a .
[Fact]
        public void VariableSinglePointCrossoverOperator_Validation_WithoutListEntityBase()
        {
            VariableSinglePointCrossoverOperator op = new VariableSinglePointCrossoverOperator();
            MockGeneticAlgorithm algorithm = new MockGeneticAlgorithm
            {
                GeneticEntitySeed = new MockEntity()
            };
            op.Initialize(algorithm);
            Assert.Throws<ValidationException>(() => op.Validate());
        }
[ Fact ] public void VariableSinglePointCrossoverOperator_Validation_WithoutListEntityBase ( ) { VariableSinglePointCrossoverOperator op = new VariableSinglePointCrossoverOperator ( ) ; MockGeneticAlgorithm algorithm = new MockGeneticAlgorithm { GeneticEntitySeed = new MockEntity ( ) } ; op . Initialize ( algorithm ) ; Assert . Throws < ValidationException > ( ( ) => op . Validate ( ) ) ; }
Tests that a validation exception is thrown if the operator is used with an
algorithm that is not configured with a .
Tests that a validation exception is thrown if the operator is used with an algorithm that is not configured with a .